aboutsummaryrefslogblamecommitdiffstats
path: root/common.h
blob: aa6a1b3292d88a085ba126c4e8b02dca341791f6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                         


                                                                      








                                                     
/* See LICENSE file for copyright and license details. */
#include "libcontacts.h"

#include <alloca.h>
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>


#define TIME_MAX ((time_t)((1ULL << (8 * sizeof(time_t) - 1)) - 1ULL))


#define DESTROY_ALL(LIST, FUNC)\
	do {\
		void *destroy_all_temp__;\
		if ((destroy_all_temp__ = (LIST))) {\
			for (; *(LIST); (LIST)++)\
				FUNC(*(LIST));\
			free(destroy_all_temp__);\
		}\
	} while (0)