Tcl Source Code

Hex Artifact Content
Login

Artifact 932ea9bf5db91492c5c944f05975cade7cf89c68:

Attachment "nbsd_gethostbyname.diff" to ticket [9146698599] added by emiliano 2015-11-01 21:35:58. (unpublished)
0000: 4e 65 74 42 53 44 20 67 65 74 68 6f 73 74 62 79  NetBSD gethostby
0010: 6e 61 6d 65 5f 72 20 69 73 20 6e 6f 74 20 63 6f  name_r is not co
0020: 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 54 63  mpatible with Tc
0030: 6c 20 75 73 61 67 65 0a 0a 49 6e 64 65 78 3a 20  l usage..Index: 
0040: 75 6e 69 78 2f 63 6f 6e 66 69 67 75 72 65 2e 69  unix/configure.i
0050: 6e 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  n.==============
0060: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0070: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0080: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0090: 3d 3d 3d 3d 0a 2d 2d 2d 20 75 6e 69 78 2f 63 6f  ====.--- unix/co
00a0: 6e 66 69 67 75 72 65 2e 69 6e 0a 2b 2b 2b 20 75  nfigure.in.+++ u
00b0: 6e 69 78 2f 63 6f 6e 66 69 67 75 72 65 2e 69 6e  nix/configure.in
00c0: 0a 40 40 20 2d 32 35 33 2c 31 30 20 2b 32 35 33  .@@ -253,10 +253
00d0: 2c 31 35 20 40 40 0a 20 09 41 43 5f 44 45 46 49  ,15 @@. .AC_DEFI
00e0: 4e 45 28 48 41 56 45 5f 4d 54 53 41 46 45 5f 47  NE(HAVE_MTSAFE_G
00f0: 45 54 48 4f 53 54 42 59 4e 41 4d 45 2c 20 31 2c  ETHOSTBYNAME, 1,
0100: 0a 20 09 09 5b 44 6f 20 77 65 20 68 61 76 65 20  . ..[Do we have 
0110: 4d 54 2d 73 61 66 65 20 67 65 74 68 6f 73 74 62  MT-safe gethostb
0120: 79 6e 61 6d 65 28 29 20 3f 5d 29 0a 20 09 41 43  yname() ?]). .AC
0130: 5f 44 45 46 49 4e 45 28 48 41 56 45 5f 4d 54 53  _DEFINE(HAVE_MTS
0140: 41 46 45 5f 47 45 54 48 4f 53 54 42 59 41 44 44  AFE_GETHOSTBYADD
0150: 52 2c 20 31 2c 0a 20 09 09 5b 44 6f 20 77 65 20  R, 1,. ..[Do we 
0160: 68 61 76 65 20 4d 54 2d 73 61 66 65 20 67 65 74  have MT-safe get
0170: 68 6f 73 74 62 79 61 64 64 72 28 29 20 3f 5d 29  hostbyaddr() ?])
0180: 0a 20 0a 2b 20 20 20 20 65 6c 69 66 20 74 65 73  . .+    elif tes
0190: 74 20 22 60 75 6e 61 6d 65 20 2d 73 60 22 20 3d  t "`uname -s`" =
01a0: 20 22 4e 65 74 42 53 44 22 3b 20 74 68 65 6e 0a   "NetBSD"; then.
01b0: 2b 09 23 20 44 6f 20 6e 6f 74 68 69 6e 67 2e 20  +.# Do nothing. 
01c0: 4e 65 74 42 53 44 27 73 20 67 65 74 68 6f 73 74  NetBSD's gethost
01d0: 62 79 6e 61 6d 65 5f 72 20 69 73 20 6e 6f 74 20  byname_r is not 
01e0: 63 6f 6d 70 61 74 69 62 6c 65 0a 2b 09 23 20 77  compatible.+.# w
01f0: 69 74 68 20 6f 75 72 20 75 73 61 67 65 2c 20 61  ith our usage, a
0200: 6e 64 20 69 73 20 6e 6f 74 20 63 6c 65 61 72 20  nd is not clear 
0210: 66 72 6f 6d 20 74 68 65 20 64 6f 63 75 6d 65 6e  from the documen
0220: 74 61 74 69 6f 6e 0a 2b 09 23 20 77 68 65 74 68  tation.+.# wheth
0230: 65 72 20 67 65 74 68 6f 73 74 62 79 6e 61 6d 65  er gethostbyname
0240: 20 69 73 20 4d 54 2d 73 61 66 65 20 6f 72 20 6e   is MT-safe or n
0250: 6f 74 2c 20 73 6f 20 62 65 74 74 65 72 20 70 6c  ot, so better pl
0260: 61 79 20 73 61 66 65 2e 0a 2b 0a 20 20 20 20 20  ay safe..+.     
0270: 65 6c 73 65 0a 20 09 53 43 5f 54 43 4c 5f 47 45  else. .SC_TCL_GE
0280: 54 48 4f 53 54 42 59 4e 41 4d 45 5f 52 0a 20 09  THOSTBYNAME_R. .
0290: 53 43 5f 54 43 4c 5f 47 45 54 48 4f 53 54 42 59  SC_TCL_GETHOSTBY
02a0: 41 44 44 52 5f 52 0a 20 20 20 20 20 66 69 0a 20  ADDR_R.     fi. 
02b0: 66 69 0a 0a                                      fi..