Only define the contents of a struct minitar inside minitar

This structure should be opaque for everyone using the library, and every public API just uses a pointer to it.
This commit is contained in:
apio 2022-11-06 11:04:52 +01:00
parent 6c916ad861
commit 6bb0fecdc4
2 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@ SRC := src
CC ?= gcc
AR ?= ar
CFLAGS ?= -O2 -Wall -Wextra
CFLAGS := ${CFLAGS} -I.
CFLAGS := ${CFLAGS} -I. -D_IN_MINITAR
DESTDIR ?= /usr/local
OBJS := $(OBJ)/tar.o \

View File

@ -3,10 +3,14 @@
#include <stdio.h>
#include <sys/types.h>
#ifdef _IN_MINITAR
struct minitar
{
FILE* stream;
};
#else
struct minitar;
#endif
enum minitar_file_type
{