File: link-with-shared

package info (click to toggle)
bzip2 1.0.8-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,744 kB
  • sloc: ansic: 7,780; xml: 7,222; sh: 655; makefile: 420; perl: 39
file content (23 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -C -e -f -u
eval $(dpkg-architecture -s)
PKG_CONFIG=$DEB_HOST_GNU_TYPE-pkg-config
CC=$DEB_HOST_GNU_TYPE-gcc

cd "$AUTOPKGTEST_TMP"
cat > hello.c <<EOF
#include <stdlib.h>
#include <bzlib.h>
int main () {
  char dst [500];
  char src [10];
  unsigned int dstLen = sizeof (dst);
  if (BZ2_bzBuffToBuffCompress (dst, &dstLen, src, sizeof (src), 1, 0, 0) == BZ_OK)
    exit (EXIT_SUCCESS);
  else
    exit (EXIT_FAILURE);
}
EOF

$CC hello.c -lbz2 -o hello
./hello