24 if ((rc =
Stat(dpath, &st)) < 0) {
35 rc =
Mkdir(dpath, 0755);
55 a = (
char *)
xmalloc(strlen(str) + 1);
64 if (!overwrite &&
getenv(name))
return 0;
67 a = (
char *)
xmalloc(strlen(name) + strlen(value) +
sizeof(
"="));
75 char * currDir =
NULL;
79 currDir = (
char *)
xrealloc(currDir, currDirLen);
80 memset(currDir, 0, currDirLen);
81 }
while (getcwd(currDir, currDirLen) ==
NULL &&
errno == ERANGE);
rpmlog(RPMLOG_ERR,"%s\n", buf)
char * getenv(const char *name)
int Stat(const char *path, struct stat *st)
stat(2) clone.
int doputenv(const char *str)
Like the libc function, but malloc()'s the space needed.
enum rpmRC_e rpmRC
RPM return codes.
Yet Another syslog(3) API clone.
memset(_r, 0, sizeof(*_r))
char * currentDirectory(void)
Return (malloc'd) current working directory.
int Mkdir(const char *path, mode_t mode)
mkdir(2) clone.
rpmRC rpmMkdirPath(const char *dpath, const char *dname)
Create directory if it does not exist, and make sure path is writable.
urltype urlPath(const char *url, const char **pathp)
Return path component of URL.
char * stpcpy(char *dest, const char *src)
static void
Print copy of spec file, filling in Group/Description/Summary from specspo.
int dosetenv(const char *name, const char *value, int overwrite)
Like the libc function, but malloc()'s the space needed.