Skip to content

Commit

Permalink
LibCore: compile puff.c as a separate object
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs authored and awesomekling committed Dec 25, 2019
1 parent 0343be3 commit 2aeae2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion Libraries/LibCore/CGzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <AK/ByteBuffer.h>
#include <AK/Optional.h>
#include <LibCore/puff.h>
#include <LibCore/puff.c>
#include <limits.h>
#include <stddef.h>

Expand Down
3 changes: 2 additions & 1 deletion Libraries/LibCore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ OBJS = \
CProcessStatisticsReader.o \
CDirIterator.o \
CUserInfo.o \
CGzip.o
CGzip.o \
puff.o

LIBRARY = libcore.a

Expand Down
8 changes: 8 additions & 0 deletions Libraries/LibCore/puff.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
Mark Adler [email protected]
*/

#ifdef __cplusplus
extern "C" {
#endif

/*
* See puff.c for purpose and usage.
*/
Expand All @@ -32,3 +36,7 @@ int puff(unsigned char* dest, /* pointer to destination pointer */
unsigned long* destlen, /* amount of output space */
const unsigned char* source, /* pointer to source data pointer */
unsigned long* sourcelen); /* amount of input available */

#ifdef __cplusplus
}
#endif

0 comments on commit 2aeae2a

Please sign in to comment.