summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/bsd/stdlib.h6
-rw-r--r--src/progname.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index cec5a28..6e7a88c 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -1,7 +1,7 @@
/*
* Copyright © 2005 Aurelien Jarno
* Copyright © 2006 Robert Millan
- * Copyright © 2008, 2009 Guillem Jover
+ * Copyright © 2008, 2009, 2010 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -48,8 +48,8 @@ void arc4random_addrandom(u_char *dat, int datlen);
int dehumanize_number(const char *str, int64_t *size);
-char *getprogname ();
-void setprogname (char *);
+const char *getprogname(void);
+void setprogname(const char *);
int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
diff --git a/src/progname.c b/src/progname.c
index 0a47c22..a5675c0 100644
--- a/src/progname.c
+++ b/src/progname.c
@@ -1,5 +1,6 @@
/*
* Copyright © 2006 Robert Millan
+ * Copyright © 2010 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,16 +31,16 @@
#include <bsd/stdlib.h>
-static char *__progname = NULL;
+static const char *__progname = NULL;
-char *
-getprogname()
+const char *
+getprogname(void)
{
return __progname;
}
void
-setprogname(char *new)
+setprogname(const char *new)
{
__progname = new;
}