* Remove checks for old Meson
We require 0.56.0 now.
* Remove deprecated Meson call
* Update calls to `pkgconfig.generate`
The library to wrap should be passed as first positional argument, and we can
pass actual dependencies as the runtime requirements. We can't pass things that
might be subprojects as dependencies, which may be a Meson bug, so pass those
ones as strings.
Testing Done:
Re-configured and looked at the pkgconfig files.
Reviewed at https://reviews.imfreedom.org/r/1064/
/* untar.c */
/*#define VERSION "1.4"*/
/* DESCRIPTION:
* Untar extracts files from an uncompressed tar archive, or one which
* has been compressed with gzip. Usually such archives will have file
* names that end with ".tar" or ".tgz" respectively, although untar
* doesn't depend on any naming conventions. For a summary of the
* command-line options, run untar with no arguments.
*
* HOW TO COMPILE:
* Untar doesn't require any special libraries or compile-time flags.
* A simple "cc untar.c -o untar" (or the local equivalent) is
* sufficient. Even "make untar" works, without needing a Makefile.
* For Microsoft Visual C++, the command is "cl /D_WEAK_POSIX untar.c"
* (for 32 bit compilers) or "cl /F 1400 untar.c" (for 16-bit).
*
* IF YOU SEE COMPILER WARNINGS, THAT'S NORMAL; you can ignore them.
* Most of the warnings could be eliminated by adding #include <string.h>
* but that isn't portable -- some systems require <strings.h> and
* <malloc.h>, for example. Because <string.h> isn't quite portable,
* and isn't really necessary in the context of this program, it isn't
* included.
*
* PORTABILITY:
* Untar only requires the <stdio.h> header. It uses old-style function
* definitions. It opens all files in binary mode. Taken together,
* this means that untar should compile & run on just about anything.
*
* If your system supports the POSIX chmod(2), utime(2), link(2), and
* symlink(2) calls, then you may wish to compile with -D_POSIX_SOURCE,
* which will enable untar to use those system calls to restore the
* timestamp and permissions of the extracted files, and restore links.
* (For Linux, _POSIX_SOURCE is always defined.)
*
* For systems which support some POSIX features but not enough to support
* -D_POSIX_SOURCE, you might be able to use -D_WEAK_POSIX. This allows
* untar to restore time stamps and file permissions, but not links.
* This should work for Microsoft systems, and hopefully others as well.
*
* AUTHOR & COPYRIGHT INFO:
* Written by Steve Kirkendall, kirkenda@cs.pdx.edu
* Placed in public domain, 6 October 1995
*
* Portions derived from inflate.c -- Not copyrighted 1992 by Mark Adler
* version c10p1, 10 January 1993
*
* Altered by Herman Bloggs <hermanator12002@yahoo.com>
* April 4, 2003
* Changes: Stripped out gz compression code, added better interface for
* untar.
*/
#include<windows.h>
#include<stdio.h>
#include<io.h>
#include<string.h>
#include<stdlib.h>
#ifndef SEEK_SET
# define SEEK_SET 0
#endif
#ifdef _WEAK_POSIX
# ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
# endif
#endif
#ifdef _POSIX_SOURCE
#include<sys/types.h>
#include<sys/stat.h>
#include<sys/utime.h>
# ifdef _WEAK_POSIX
# define mode_t int
# else
#include<unistd.h>
# endif
#endif
#include<glib.h>
#include<glib/gstdio.h>
#include<purple.h>
#include"untar.h"
#define WSIZE 32768 /* size of decompression buffer */
#define TSIZE 512 /* size of a "tape" block */
#define CR 13 /* carriage-return character */
#define LF 10 /* line-feed character */
typedefunsignedcharUchar_t;
typedefunsignedshortUshort_t;
typedefunsignedlongUlong_t;
typedefstruct
{
charfilename[100];/* 0 name of next file */
charmode[8];/* 100 Permissions and type (octal digits) */
charowner[8];/* 108 Owner ID (ignored) */
chargroup[8];/* 116 Group ID (ignored) */
charsize[12];/* 124 Bytes in file (octal digits) */
charmtime[12];/* 136 Modification time stamp (octal digits)*/