Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

316 lines
13 KiB

13 years ago
13 years ago
13 years ago
14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
15 years ago
15 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
17 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
19 years ago
19 years ago
18 years ago
19 years ago
20 years ago
20 years ago
20 years ago
20 years ago
21 years ago
21 years ago
  1. 0.30:
  2. add compiletimeassert.h
  3. add haveuint128.h
  4. byte.h now defines UNALIGNED_ACCESS_OK on x86
  5. add scan_ulongn, scan_8longn, scan_xlongn, scan_longn, scan_netstring
  6. change buffer to have a destructor function pointer
  7. SECURITY: fmt_strn would write one byte too many (returned right length though, so usually not a problem as that byte would be overwritten with \0 by the caller anyway)
  8. fmt_pad and fmt_fill fail more gracefully when srclen > maxlen
  9. You can now say $ make WERROR=-Werror (compiling t.c may fail but that's strictly speaking not part of the library)
  10. scan_html now decodes HTML entities based on the actual w3c list (from entities.json, say gmake update to fetch the current version)
  11. added fmt_escapechar* to fmt.h (implement various escaping mechanisms also found in textcode but for a single char not a whole string, and they always escape, not just when they think it's needed)
  12. scan_ushort was supposed to abort early and return 5 when attempting to parse "65536", because the result does not fit. It did not. Now it does.
  13. scan_*long, scan_*int, scan_*short now properly abort if the number would not fit
  14. SECURITY: check for integer overflow in stralloc_ready
  15. switch io_fds from array to newly implemented (hopefully thread-safe) iarray
  16. switch epoll from level triggering to edge triggering
  17. 0.29:
  18. save 8 bytes in taia.h for 64-bit systems
  19. add buffer_tosa (buffer writing to auto-growing stralloc)
  20. add iarray
  21. support SCTP in addition to TCP
  22. fix io_receivefd so the incoming buffer is only 1 byte; io_passfd
  23. sends only one byte, so we might receive (and discard) other data if
  24. we try to read more (Stefan Bühler, from the lightttpd project)
  25. add io_fd_canwrite (like io_fd but assume the fd is writable)
  26. save a few syscalls here and there
  27. add awesome hack in isset.h (comex, Linus Torvalds)
  28. add byte_equal_notimingattack
  29. 0.28:
  30. add uint64 pack and unpack routines
  31. fix subtle typo in sub_of (David Sirovsky)
  32. work around gcc bugs
  33. 0.27:
  34. add fmt_strm
  35. add iob_addbuf_munmap
  36. add socket_deferaccept
  37. catch one more case in umult64 (Tomi Jylhä-Ollila)
  38. 0.26:
  39. fix really pathological case where io_timeouted would never
  40. start over from the beginning because always new accept()ed
  41. connections came in and got newer, higher descriptors since the last
  42. io_timeouted loop. (Dirk Engling)
  43. add some int overflow check macros to rangecheck.h
  44. fmt_ip6 compresses at best spot, not at first spot (Nikola Vladov)
  45. use inttypes.h to declare ints in uint*.h
  46. escape more in fmt_ldapescape
  47. try to catch malicious input in textcode fmt_* functions
  48. fmt_xlonglong was utterly broken (Johannes Vetter)
  49. 0.25:
  50. array_allocate no longer truncates the array
  51. array_get now not only checks whether the element fits in the
  52. allocates space, it also needs to be in the initialized space.
  53. add -D_REENTRANT to CFLAGS so libowfat can be used in multi-threaded
  54. programs
  55. further Windoze support (test/io5.c works, gatling still doesn't)
  56. This is just to get gatling to work, I may remove it again after
  57. that.
  58. implement Nikola's idea to remove limit number of strings in errmsg
  59. add taia_half
  60. add cdb
  61. add rangecheck.h
  62. add io_block
  63. make socket_(tc|ud)p[46] actually return non-blocking sockets as
  64. documented (Richard Lyons)
  65. fix for NetBSD 3.0 (Their /sys/types.h actually does not define u_char
  66. unless you #define _NETBSD_SOURCE, and then their CMSG_* macros use
  67. it. This is horrible even by OpenBSD standards)
  68. remove support for ip6.int (it's no longer delegated)
  69. add asm versions of imult64 and umult64 for x86_64
  70. (22 cycles -> 12 cycles on my Athlon 64)
  71. use size_t and ssize_t instead of unsigned long et al
  72. add iob_bytesleft
  73. don't leak memory in test/httpd
  74. 0.24:
  75. fix scan_to_sa (Tim Lorenz)
  76. turns out we can not do file descriptor passing on OpenBSD
  77. if _XOPEN_SOURCE is defined, which is needed for Solaris.
  78. OpenBSD sucks. I checked in a _really_ kludge now. Please do not
  79. use OpenBSD if you have a choice. Or Solaris, for that matter.
  80. turns out the imult routines (which I never used) were incorrect.
  81. Noted by Matthew Dempsky
  82. open_* from open.h now open in large file mode
  83. 0.23:
  84. also recognize EPFNOSUPPORT as EAFNOSUPPORT (groan)
  85. fix a few man pages
  86. optimize fmt_base64 (Dan Gundlach)
  87. gcc 4 cleanups (mostly unsigned char* vs char*)
  88. fix scan_xlong, scan_xlonglong and scan_8long
  89. remove a few gcc 4 warnings
  90. work around freebsd 5.4 brokenness (if you don't have IPv6 in the
  91. kernel, socket(PF_INET6,SOCK_STREAM,0) returns EPROTONOSUPPORT
  92. instead of EPFNOSUPPORT, which basically says "yeah, I know IPv6,
  93. but TCP? never heard of it")
  94. remove even more warnings
  95. 64-bit cleanliness issue with auto-NULL-appending macros
  96. IRIX compatibility (yuck!)
  97. 0.22:
  98. uh, the scope_id detection #defined the wrong constant. libowfat
  99. always thought there was no scope_id. Oops.
  100. #include <unistd.h> in io/io_sendfile.c (broken OpenBSD, thx Rob)
  101. add scan_urlencoded2 (like scan_urlencoded but will not convert '+' to
  102. ' '; needed for web servers, so they can serve libstdc++.tar.gz)
  103. fix iob_write to handle failure properly
  104. document that the iob_write callback should limit itself
  105. fix mmap_shared
  106. add iob_free, add man pages for iob_free and iob_reset
  107. fix descriptor leak in iob_addfile_close if the range was 0 (oops)
  108. 0.21:
  109. errno cleanup and man page updates (Rolf Eike Beer)
  110. implement iob_prefetch with madvise MADV_WILLNEED if it's defined
  111. extend API To read line/token to stralloc to allow clearing the
  112. stralloc first.
  113. add stralloc_zero to clear a stralloc
  114. add buffer_putsflush
  115. add stralloc_catm and stralloc_copym
  116. add buffer_putm and buffer_putmflush
  117. cleanups in stralloc and buffer:
  118. int -> long for sizes
  119. char -> unsigned char for strings
  120. buffer_getline is now a function, not a macro
  121. add iob_write (send io batch through callback, e.g. for SSL)
  122. add errmsg_info and errmsg_infosys to write to stdout instead
  123. epoll fix (how could this ever work?)
  124. 0.20:
  125. add errmsg API
  126. work around broken Linux sendfile API (offset 64-bit but count 32-bit)
  127. add io_appendfile, io_readwritefile
  128. support ip6.arpa in addition to ip6.int in dns_name (adds one
  129. parameter to dns_name6_domain and two constants in dns.h)
  130. Solaris compatibility for io_passfd and io_receivefd
  131. 0.19.2:
  132. for some reason, a botched dependency slipped in the the Makefile
  133. 0.19.1:
  134. oops, I botched havealloca.h, which was not generated but static
  135. Now it is generated.
  136. 0.19:
  137. add io_socketpair
  138. add io_passfd and io_receivefd (and test/fdpassing.c)
  139. io_trywrite and io_waitwrite not ignore SIGPIPE
  140. add man pages for libio, safemult
  141. fix possible signal race in io_tryread and io_trywrite (Scott Lamb)
  142. fix byte_rchr return value (Marcus Winkler)
  143. fix bug in mmap code path of io_sendfile (David Leadbeater)
  144. 0.18:
  145. make libowfat compile on BSD again (sorry, and thanks to everyone who
  146. sent me a patch :-D)
  147. add iob_addfile_close, needed for gatling 0.5+
  148. add test/client and test/server, two simple TCP shell interfaces
  149. 0.17:
  150. add Linux SIGIO support to IO
  151. expand IO api to be able to cope with edge triggered event
  152. notification: introduce io_eagain
  153. the integer scan routines should only write *dest if they actually
  154. scanned something
  155. io_sendfile and iob_send should return -1 to -3 just like io_trywrite
  156. make io_waituntil actually take an "until", not a "how long"
  157. turns out that BSD kqueue is actually Free/OpenBSD kqueue -- NetBSD
  158. doesn't have it. That means I'll need some adaptive two-threads-
  159. running-poll approach to get C10k type scalability on NetBSD :-(
  160. turns out that BSD sendfile is actually FreeBSD sendfile -- neither
  161. OpenBSD nor NetBSD have it (as of 3.4 and 1.6.1). That means I'll
  162. need to try using mmap on OpenBSD and NetBSD to get zero-copy TCP.
  163. guard against same event being signalled twice (confused our list
  164. handling)
  165. add support for Solaris /dev/poll
  166. add lose32 support (broken, please don't use!)
  167. head -1 -> head -n 1
  168. apending 0 bytes to an empty array would fail it
  169. remove socket_sendfile now that we have io_sendfile
  170. break out alloca #include dependency into havealloca.h
  171. support HP-UX sendfile64 (thanks to Rolf Eike Beer)
  172. support Solaris sendfile64
  173. support MacOS X sendfile (and comment it out again, the headers
  174. declare it but it's not actually there) (thanks to Bernhard Schmidt)
  175. support AIX 5 (thanks to Lutz Chwala and Arthur Erhardt)
  176. fix ip6_fmt (martin paljak)
  177. 0.16:
  178. add buffer_fromsa (make buffer from stralloc)
  179. add API for integer multiply with overflow detection
  180. change length counters from int to long for 64-bit platforms
  181. add array API from http://cr.yp.to/lib/array.html
  182. oops, had a declaration and man page for taia_addsec but not the
  183. function itself
  184. add buffer functions to write strerror(errno)
  185. add io API supporting poll, epoll and kqueue
  186. remove obsolete "extern" from header files
  187. add iob API to send several buffers and files in one batch
  188. 0.15:
  189. man page update (document stralloc return values)
  190. add stralloc_chop and stralloc_chomp
  191. add buffer_putsa, buffer_get_token_sa and buffer_getline_sa
  192. extended uudecode test. See comment at top for details.
  193. fix #include in ndelay*.3 (Hynek Schlawack)
  194. add stralloc_diff and stralloc_diffs (my invention)
  195. scan_ip6 returned 1 for "::" (Uwe Ohse)
  196. add el-cheapo MIME decoding to test/uudecode
  197. make install forgot to install ndelay.h
  198. fix typos in several man pages (Hynek Schlawack)
  199. add stralloc versions of textcode API (Kai Ruemmler)
  200. add html to textcode ('<' to '&lt;' etc)
  201. add fmt_human and fmt_humank (format numbers ala ls -H/-h)
  202. add fmt_httpdate and scan_httpdate
  203. fix typo breaking buffer_GETC in buffer (Marcus Winkler)
  204. fix typo breaking fmt_long for dest==NULL
  205. add fmt_*longlong()
  206. add range check to scan_ulong, scan_ulonglong, scan_uint and
  207. scan_ushort
  208. extended socket API; you can now pass NULL for results you don't want
  209. rename Makefile to GNUmakefile; create Makefile target
  210. add buffer_get_token_pred and buffer_get_token_sa_pred
  211. 0.14:
  212. avoid bus errors in byte_copy
  213. byte_rchr was completely broken
  214. add case, iopause, tai, taia, openreadclose and ipv6-enhanced dns
  215. 0.13:
  216. fixed several bugs in test/uudecode.c
  217. add uninstall target
  218. add uint16_read API like the uint32_read one
  219. add buffer_putnlflush
  220. lots of general clean-ups from Jukka Zitting:
  221. add FMT_LONG to fmt.h (FMT_ULONG plus 1 for sign)
  222. fmt_strn did not work for out==NULL
  223. fix inconsistencies in man pages
  224. make scan_urlencode do the '+' -> ' ' transformation
  225. 0.12:
  226. add textcode api for uuencode/uudecode, base64, quoted printable,
  227. url-encoding and yenc.
  228. 0.11:
  229. fix fmt_long (didn't count the '-'), which in turn broke
  230. buffer_putlong
  231. referenced wrong include file in stralloc_ready and stralloc_readyplus
  232. man page.
  233. 0.10:
  234. add comment to stralloc.h that explains the structure (Markus Brischke)
  235. fix socket routines (two cut-and-paste errors)
  236. 0.9:
  237. fmt_str did not check for out==NULL! Thanks, Uwe Ohse.
  238. Updated to buffer to fix read buffers. Thanks, David Lichteblau.
  239. Oops! byte_copy had a trivial and dumb typo in it that I'm unsure how
  240. I could have missed it.
  241. add mmap man pages.
  242. update and add socket man pages.
  243. don't include str.h from fmt.h
  244. document error signalling for the mmap functions.
  245. 0.8:
  246. BSD compatibility.
  247. fix mmap_shared.
  248. ranlib.
  250. 0.7:
  251. add buffer_putspace
  252. fix b0read prototype in buffer/buffer_0*
  253. scan_ip6 will not transparently scan IPv4 addresses and save them as
  254. v4-mapped addresses (::ffff:
  255. byte_copy was sped up (but made larger in the process)
  256. 0.6:
  257. changed name to libowfat.
  258. fixed fmt_ulong (did not output 0 correctly).
  259. added buffer.
  260. extended buffer API to include buffer_putulong() and friends.
  261. oops, the read buffering was completely broken!
  262. add mmap library (idea from Ingo Oeser)
  263. 0.5:
  264. made subdirectories for the different libraries.
  265. moved the sources into the corresponding subdirectory.
  266. imported my man pages from libdjb.
  267. removed fmt_int.c and fmt_uint.c (they are macros in fmt.h).
  268. corrected comment in open.h for open_excl.
  269. wrote new man pages for fmt_double, scan_double, the sign fmt_ and
  270. scan_ routines, the whitespace and charset scan_ routines, and the
  271. str and stralloc routines.
  272. 0.4:
  273. implemented stralloc.
  274. 0.3:
  275. implemented uint16, uint32 and uint64. The header files try to
  276. define shortcut endianness conversion routines that do not convert
  277. anything.
  278. implemented open (I hope I got open_excl right, I couldn't find an
  279. implementationen).
  280. 0.2:
  281. implemented the scan, fmt and str interfaces.
  282. added adapted fmt_double and scan_double from diet libc.
  283. 0.1:
  284. initial release.
  285. implemented the byte interface.