Permalink
Browse files

Step 6: build other files.

  • Loading branch information...
Ben Laurie
Ben Laurie committed Apr 27, 2012
1 parent 21cbf91 commit 493fbb46501ce3876861d5cc4e3183affdbe4ae0
Showing with 16 additions and 9 deletions.
  1. +3 −0 contrib/bzip2/CONVERSION
  2. +0 −8 contrib/bzip2/bzip2.c
  3. +3 −1 contrib/bzip2/bzip2_wrapped.c
  4. +8 −0 contrib/bzip2/bzip2_wrapped.h
  5. +2 −0 usr.bin/bzip2/Makefile
View
@@ -47,3 +47,6 @@
Once this is done bzip2.c compiles cleanly once more. However, the
link fails.
6. Fix the build to include the other files. Fix stupid mistakes. Move
definitions that need to be shared (and can be safely!).
View
@@ -89,8 +89,6 @@
# define APPEND_FLAG(root, name) \
root=snocString((root), (name))
# define SET_BINARY_MODE(fd) /**/
# ifdef __GNUC__
# define NORETURN __attribute__ ((noreturn))
# else
@@ -162,15 +160,9 @@
--*/
typedef char Char;
typedef unsigned char UChar;
typedef int Int32;
typedef unsigned int UInt32;
typedef short Int16;
typedef unsigned short UInt16;
#define True ((Bool)1)
#define False ((Bool)0)
/*--
IntNative is your platform's `native' int size.
Only here to avoid probs with 64-bit platforms.
@@ -1,4 +1,6 @@
#include "bzip2_wrapped.c"
#include <stdio.h>
#include "bzlib.h"
#include "bzip2_wrapped.h"
/*---------------------------------------------------*/
/*--- An implementation of 64-bit ints. Sigh. ---*/
@@ -1,4 +1,12 @@
typedef unsigned char Bool;
typedef unsigned char UChar;
typedef int Int32;
typedef unsigned int UInt32;
#define True ((Bool)1)
#define False ((Bool)0)
#define SET_BINARY_MODE(fd) /**/
void wrapped_compressStream ( FILE *stream, FILE *zStream );
Bool wrapped_uncompressStream ( FILE *zStream, FILE *stream );
View
@@ -6,6 +6,8 @@ BZ2DIR= ${.CURDIR}/../../contrib/bzip2
PROG= bzip2
CFLAGS+= -D_FILE_OFFSET_BITS=64
SRCS= capsicum.c bzip2_wrapped.c bzip2.c
WARNS?= 3
DPADD= ${LIBBZ2}

0 comments on commit 493fbb4

Please sign in to comment.