Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Eliminate some more FreeBSD'sms
Vsevolod Stakhov committed 11 years ago
commit 32d7ad174756780258eff4d7a737ee7fcf651546
parent f919160
4 files changed +13 -7
modified libpkg/pkg_delete.c
@@ -157,7 +157,7 @@ pkg_add_dir_to_del(struct pkg *pkg, const char *file, const char *dir)

	if (pkg->dir_to_del_len + 1 > pkg->dir_to_del_cap) {
		pkg->dir_to_del_cap += 64;
-
		pkg->dir_to_del = reallocf(pkg->dir_to_del,
+
		pkg->dir_to_del = realloc(pkg->dir_to_del,
		    pkg->dir_to_del_cap * sizeof(char *));
	}

@@ -379,7 +379,7 @@ pkg_delete_dir(struct pkg *pkg, struct pkg_dir *dir)
	} else {
		if (pkg->dir_to_del_len + 1 > pkg->dir_to_del_cap) {
			pkg->dir_to_del_cap += 64;
-
			pkg->dir_to_del = reallocf(pkg->dir_to_del,
+
			pkg->dir_to_del = realloc(pkg->dir_to_del,
			    pkg->dir_to_del_cap * sizeof(char *));
		}
		pkg->dir_to_del[pkg->dir_to_del_len++] = strdup(path);
modified libpkg/pkg_ports.c
@@ -546,7 +546,7 @@ parse_post(struct plist *p)
			continue;
		if (p->post_patterns.len >= p->post_patterns.cap) {
			p->post_patterns.cap += 10;
-
			p->post_patterns.patterns = reallocf(p->post_patterns.patterns, p->post_patterns.cap * sizeof (char *));
+
			p->post_patterns.patterns = realloc(p->post_patterns.patterns, p->post_patterns.cap * sizeof (char *));
		}
		p->post_patterns.patterns[p->post_patterns.len++] = token;
	}
modified src/repo.c
@@ -24,6 +24,10 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

+
#ifdef HAVE_CONFIG_H
+
#include "pkg_config.h"
+
#endif
+

#include <bsd_compat.h>
#include <getopt.h>
#include <signal.h>
@@ -31,10 +35,12 @@
#include <stdio.h>
#include <string.h>

-
#ifdef HAVE_BSD_READPASSPHRASE_H
+
#ifdef HAVE_READPASSPHRASE_H
+
#include <readpassphrase.h>
+
#elif defined(HAVE_BSD_READPASSPHRASE_H)
#include <bsd/readpassphrase.h>
#else
-
#include <readpassphrase.h>
+
#include "readpassphrase_compat.h"
#endif

#include <unistd.h>
modified src/version.c
@@ -565,7 +565,7 @@ exec_buf(struct sbuf *res, char **argv) {
	}

	if ((spawn_err = posix_spawn_file_actions_init(&actions)) != 0) {
-
		warnc(spawn_err, "%s", argv[0]);
+
		warnx("%s:%s", argv[0], strerror(spawn_err));
		return (0);
	}

@@ -578,7 +578,7 @@ exec_buf(struct sbuf *res, char **argv) {
	    (spawn_err = posix_spawnp(&pid, argv[0], &actions, NULL,
	    argv, environ)) != 0) {
		posix_spawn_file_actions_destroy(&actions);
-
		warnc(spawn_err, "%s", argv[0]);
+
		warnx("%s:%s", argv[0], strerror(spawn_err));
		return (0);
	}
	posix_spawn_file_actions_destroy(&actions);