Mercurial > molko
comparison libmlk-core/core/zfile.c @ 313:dbfe05b88627
cmake: bring back for good
It's just too complicated to get portability done right using pure GNU make and
since we're targeting more OSes than Linux we have to incorporate some
portability bits.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 22 Sep 2021 07:19:32 +0200 |
parents | b271a0e8ce52 |
children | d01e83210ca2 |
comparison
equal
deleted
inserted
replaced
312:4ea0f035f712 | 313:dbfe05b88627 |
---|---|
29 | 29 |
30 /* | 30 /* |
31 * If not enabled, we still need to check if a file is in zstandard so we use | 31 * If not enabled, we still need to check if a file is in zstandard so we use |
32 * the magic number defined in the zstd.h file or copy it if zstd is disabled. | 32 * the magic number defined in the zstd.h file or copy it if zstd is disabled. |
33 */ | 33 */ |
34 #if defined(MOLKO_WITH_ZSTD) | 34 #if defined(MLK_WITH_ZSTD) |
35 # include <zstd.h> | 35 # include <zstd.h> |
36 #else | 36 #else |
37 # define ZSTD_MAGICNUMBER 0xFD2FB528 | 37 # define ZSTD_MAGICNUMBER 0xFD2FB528 |
38 #endif | 38 #endif |
39 | 39 |
61 } | 61 } |
62 | 62 |
63 static int | 63 static int |
64 decompress(int fd, struct zfile *zf) | 64 decompress(int fd, struct zfile *zf) |
65 { | 65 { |
66 #if defined(MOLKO_WITH_ZSTD) | 66 #if defined(MLK_WITH_ZSTD) |
67 char *in = NULL; | 67 char *in = NULL; |
68 unsigned long long datasz; | 68 unsigned long long datasz; |
69 struct stat st; | 69 struct stat st; |
70 ssize_t nr; | 70 ssize_t nr; |
71 | 71 |