Move locking specific functions into their own source file

This commit is contained in:
jsteube
2016-09-06 19:08:46 +02:00
parent e4bf86dcbe
commit b8e47c2ba2
6 changed files with 78 additions and 40 deletions
+28
View File
@@ -0,0 +1,28 @@
/**
* Author......: Jens Steube <jens.steube@gmail.com>
* License.....: MIT
*/
#ifndef _LOCKING_H
#define _LOCKING_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#ifdef F_SETLKW
void lock_file (FILE *fp);
void unlock_file (FILE *fp);
#else
#define lock_file(dummy) {}
#define unlock_file(dummy) {}
#endif
#endif // _LOCKING_H