469 Commits

Author SHA1 Message Date
Pascal Obry
5c31bdfaa6 Add static-pic build variant.
Fixes S605-001.
2023-09-08 07:22:13 +00:00
Dmitriy Anisimkov
178767546d Detect end of ZLib stream better
When size of gzipped stream is few bytes more than multiple of
Read_Buffer_Size stream creation parameter, the end of stream can be
detected only after last empty read. To fix that we should try to read
and inflate ahead.

TN: U727-039
2021-08-18 15:06:21 +06:00
Dmitriy Anisimkov
088c7048ff New routine to detect end of ZLib stream
Minor reformat.

TN: U727-039
2021-08-10 13:52:36 +06:00
Dmitriy Anisimkov
ce9d763b82 Fixes and improvements for Memory_Stream
no-tn-check

Fixes related for memory blocks with Block'First /= 1.
2021-06-26 12:56:54 +06:00
Dmitriy Anisimkov
59d54778cb More common end-of-stream detection
TC01-031

Raise exception when there was no Z_STREAM_END return code and there is no
input data and there is no output data and Flush = Finish. This way the
error will be detected not only in Read but also in Write and
Generic_Translate routines.
Test improved to detect end-of-stream error even if only one byte removed
from the end of file.
2020-12-10 00:21:27 +06:00
Pascal Obry
8646dce7cc Fix Zlib end-of-stream detection.
When no more data are read from the stream and there is no more
to be read we make sure we exit the loop in Read to avoid an
infinite loop. This happens when reading a set of bytes for a
multi-byte type.

Add corresponding regression test.

For TC01-031.
2020-12-03 16:58:20 +01:00
Pascal Obry
97aa83c33d Minor reformatting. 2020-10-18 23:02:52 +02:00
Dmitriy Anisimkov
bde166bcdc Detect error when input data to inflate is zero length
TA13-028

Do not ignore Z_BUF_ERROR if no data on input.
2020-10-17 09:40:57 +02:00
Nicolas Boulenguez
20bf52aa37 Pass ADAFLAGS to include.gpr and add CPPFLAGS to CFLAGS.
This patch does not apply the common style flags to include/*, it only
allow explicit user flags (ADAFLAGS) to override default flags.

The External is in shared.gpr so that there is only one environment
lookup for each variable.
2020-04-20 14:39:48 +02:00
Dmitriy Anisimkov
bde9f5a194 Don't raise error on Flush repeat
S325-036
2019-09-25 16:33:23 +06:00
Dmitriy Anisimkov
ce404d1e48 Synchronize with zlib-ada repository 2019-09-25 15:26:05 +06:00
Dmitriy Anisimkov
2814995677 Update ZLib sources to the latest version 1.2.11
S201-013
2019-02-03 18:47:18 +01:00
Dmitriy Anisimkov
f38f41b98b Use "to" instead of "for" in English properly. 2018-07-22 23:15:57 +06:00
Dmitriy Anisimkov
4211dfdea7 Synch with original ZLib-Ada repository
ZLib-Ada original repository ssh://git.code.sf.net/p/zlib-ada/git
was accepted all AWS modifications and returns one back to AWS here.
At this stage include/zlib?* files absolutely equal to zlib-ada
sources after commit 4b89ae14ca71f8584f8202b8f9bf8874f26431a9.
2018-07-16 05:18:52 +06:00
Pascal Obry
9c181ea8a9 Merge branch 'po/send-socket-set'
* po/send-socket-set:
  Add support for sending WebSocket messages without blocking.
  Add support for memory socket.
  Add support for sending the same data to a Socket_Set.
  Add new routine Pending in Memory_Stream.
  Minor style fixes.
2015-11-17 19:17:28 +01:00
Pascal Obry
412442839e Refine previous fix.
For OB15-006.
2015-11-16 18:47:09 +01:00
Pascal Obry
7408fef0bb Fix Zlib/Gzip footer data encoding.
The Gzip footer is an 8 bytes array. The first four bytes are for the
CRC and the last four bytes are the total size of the uncompressed
data modulo 2 ** 32.

For OB15-006.
2015-11-15 17:51:28 +01:00
Pascal Obry
7017509416 Add new routine Pending in Memory_Stream.
This routine returns the number of byte yet to be read.

Part of OA28-005.
2015-11-08 19:31:20 +01:00
Dmitriy Anisimkov
0cc23276ea Fix error on append value after constant access.
OB04-011
2015-11-04 18:45:37 +06:00
Pascal Obry
be9f73b780 Minor style fixes. 2015-11-04 08:19:30 +01:00
Pascal Obry
4e4159335f Rename makefile to Makefile (GNU standard)
This is also what GPS expects by default.

For O604-017.
2015-06-16 17:20:29 +02:00
Pascal Obry
7b66658db1 Minor style fixes.
Remove superfluous with and use clauses.
Remove superfluous type conversion.

Contributed by Nicolas Boulenguez.
2014-08-18 19:01:35 +02:00
Pascal Obry
0b8e5d2e19 Add support for external CFLAGS, ADAFLAGS and LDFLAGS for building.
Contributed by Nicolas Boulenguez.
2014-08-18 11:40:16 +02:00
Pascal Obry
4fd283479f Minor style fixes. 2014-08-01 23:39:08 +02:00
Pascal Obry
f2db7e6f01 Mark zlib project as not to be installed.
We never want the .h to be installed with AWS sources. These are really
for internal use by AWS.
2014-04-29 18:45:57 +02:00