view dbhelpers.h @ 1663:c795520269f9

Fallback for key gen without hard link support (#89) Add a non-atomic fallback for key generation on platforms where link() is not permitted (such as most stock Android installs) or on filesystems without hard link support (such as FAT).
author Matt Robinson <git@nerdoftheherd.com>
date Sat, 14 Mar 2020 14:37:35 +0000
parents d68d61e7056a
children
line wrap: on
line source

#ifndef DROPBEAR_DBHELPERS_H_
#define DROPBEAR_DBHELPERS_H_

/* This header defines some things that are also used by libtomcrypt/math. 
   We avoid including normal include.h since that can result in conflicting 
   definitions - only include config.h */
#include "config.h"

#ifdef __GNUC__
#define ATTRIB_PRINTF(fmt,args) __attribute__((format(printf, fmt, args))) 
#define ATTRIB_NORETURN __attribute__((noreturn))
#define ATTRIB_SENTINEL __attribute__((sentinel))
#else
#define ATTRIB_PRINTF(fmt,args)
#define ATTRIB_NORETURN
#define ATTRIB_SENTINEL
#endif

void m_burn(void* data, unsigned int len);

#endif /* DROPBEAR_DBHELPERS_H_ */