summaryrefslogtreecommitdiffstats
path: root/stubs/bzip.c
blob: b6f304bf96dcb518dd3216a4ebbaeb9d427cbdd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* empty bzip stubs */

# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
  extern __typeof (name) aliasname __attribute__ ((alias (#name)));

void * bzdopen(int fd, const char *mode) {
    return (void *) 0;
}

void * bzopen(const char * fn, const char *mode) {
    return (void *) 0;
}

const char * bzerror(void * b, int * err) {
    return (void *) 0;
}

int bzwrite(void * b, void * buf, int len) {
    return -1;
}

int bzread(void * b, void * buf, int len) {
    return -1;
}

void bzclose(void * b) {
}

int bzflush(void * b) {
    return 0;
}

strong_alias(bzclose, BZ2_bzclose)
strong_alias(bzdopen, BZ2_bzdopen)
strong_alias(bzerror, BZ2_bzerror)
strong_alias(bzflush, BZ2_bzflush)
strong_alias(bzopen,  BZ2_bzopen)
strong_alias(bzread,  BZ2_bzread)
strong_alias(bzwrite, BZ2_bzwrite)