mirror of
https://github.com/termux-pacman/glibc-packages.git
synced 2024-11-13 15:09:21 +00:00
1b81427dac
- adding the ability to change the prefix - adding new search paths for libraries and headers for 32-bit (arm and i686) gcc
23 lines
494 B
C++
23 lines
494 B
C++
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "cgct-app-prefix.h"
|
|
|
|
#ifdef HOST_GENERATOR_FILE
|
|
#include "config.h"
|
|
#define GENERATOR_FILE 1
|
|
#else
|
|
#include "bconfig.h"
|
|
#endif
|
|
#include "system.h"
|
|
|
|
#define CGCT_DEFAULT_PREFIX "/data/data/com.termux/files/usr/glibc"
|
|
|
|
#define CGCT_GETENV_PREFIX getenv("CGCT_APP_PREFIX")
|
|
|
|
char* cgct_app_prefix(const char* path) {
|
|
if (CGCT_GETENV_PREFIX)
|
|
return concat(CGCT_GETENV_PREFIX, path, NULL);
|
|
else
|
|
return concat(CGCT_DEFAULT_PREFIX, path, NULL);
|
|
}
|