Skip to content

Commit a900bc0

Browse files
committed
adding compiling section to README.md
1 parent 535b18f commit a900bc0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,27 @@ The overarching goal was to modify the original bsdiff/bspatch code from Colin
3434
and eliminate external dependencies and provide a simple interface to the core
3535
functionality.
3636

37-
You can defined `BSDIFF_HEADER_ONLY` or `BSPATCH_HEADER_ONLY` to only include
37+
You can define `BSDIFF_HEADER_ONLY` or `BSPATCH_HEADER_ONLY` to only include
3838
the header parts of the file. If including a `.c` file makes you feel really
3939
dirty you can copy paste the header portion at the top of the file into your own
4040
`.h` file.
4141

4242
I've exposed relevant functions via the `_stream` classes. The only external
4343
dependency not exposed is `memcmp` in `bsdiff`.
4444

45+
Compiling
46+
---------
47+
The libraries should compile warning free in any moderately recent version of
48+
gcc. The project uses `<stdint.h>` which is technically a C99 file and not
49+
available in Microsoft Visual Studio. The easiest solution here is to use the
50+
msinttypes version of stdint.h from <https://code.google.com/p/msinttypes/>.
51+
The direct link for the lazy people is:
52+
<https://msinttypes.googlecode.com/svn/trunk/stdint.h>.
53+
54+
If your compiler does not provide an implementation of `<stdint.h>` you can
55+
remove the header from the bsdiff/bspatch files and provide your own typedefs
56+
for the following symbols: `uint8_t`, `uint64_t` and `int64_t`.
57+
4558
Examples
4659
--------
4760
Each project has an optional main function that serves as an example for using

0 commit comments

Comments
 (0)