aboutsummaryrefslogtreecommitdiff
path: root/include/relocation.h
blob: 9a1f0f4ac5077a2e1d1300b3f7e83e5fe4feecfc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
 * @file relocation.h
 */
#ifndef STASIS_RELOCATION_H
#define STASIS_RELOCATION_H

#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(STASIS_OS_DARWIN)
#include <limits.h>
# else
#include <linux/limits.h>
#endif
#include <unistd.h>

#define REPLACE_TRUNCATE_AFTER_MATCH 1

int replace_text(char *original, const char *target, const char *replacement, unsigned flags);
int file_replace_text(const char* filename, const char* target, const char* replacement, unsigned flags);

#endif //STASIS_RELOCATION_H