mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
Fix warnings when building jam.
Sorry for the included whitespace cleanup.
This commit is contained in:
parent
c20a732df8
commit
6c03949644
@ -50,6 +50,10 @@
|
||||
# include <process.h>
|
||||
# endif
|
||||
|
||||
# ifdef unix
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
# ifdef OS_NT
|
||||
# define USE_EXECNT
|
||||
# include <process.h>
|
||||
@ -231,7 +235,7 @@ execcmd(
|
||||
# else
|
||||
if ((pid = vfork()) == 0)
|
||||
{
|
||||
execvp( argv[0], argv );
|
||||
execvp( argv[0], (char* const*)argv );
|
||||
_exit(127);
|
||||
}
|
||||
# endif
|
||||
|
28
jam/hcache.c
28
jam/hcache.c
@ -42,7 +42,7 @@
|
||||
* */
|
||||
|
||||
struct hcachedata {
|
||||
char *boundname;
|
||||
const char *boundname;
|
||||
time_t time;
|
||||
LIST *includes;
|
||||
LIST *hdrscan; /* the HDRSCAN value for this target */
|
||||
@ -70,10 +70,10 @@ static int hits = 0;
|
||||
* We cache the result so the user can't change the cache file during
|
||||
* header scanning.
|
||||
*/
|
||||
static char*
|
||||
static const char*
|
||||
cache_name(void)
|
||||
{
|
||||
static char* name = 0;
|
||||
static const char* name = 0;
|
||||
if (!name) {
|
||||
LIST *hcachevar = var_get("HCACHEFILE");
|
||||
|
||||
@ -116,7 +116,7 @@ cache_maxage(void)
|
||||
* ASCII 0. The returned value is as returned by newstr(), so it need
|
||||
* not be freed.
|
||||
*/
|
||||
char*
|
||||
const char*
|
||||
read_netstring(FILE* f)
|
||||
{
|
||||
unsigned long len;
|
||||
@ -169,9 +169,9 @@ hcache_init()
|
||||
{
|
||||
HCACHEDATA cachedata, *c;
|
||||
FILE *f;
|
||||
char *version;
|
||||
const char *version;
|
||||
int header_count = 0;
|
||||
char* hcachename;
|
||||
const char* hcachename;
|
||||
|
||||
hcachehash = hashinit (sizeof (HCACHEDATA), "hcache");
|
||||
|
||||
@ -189,11 +189,11 @@ hcache_init()
|
||||
|
||||
while (1)
|
||||
{
|
||||
char* record_type;
|
||||
char *time_str;
|
||||
char *age_str;
|
||||
char *includes_count_str;
|
||||
char *hdrscan_count_str;
|
||||
const char* record_type;
|
||||
const char *time_str;
|
||||
const char *age_str;
|
||||
const char *includes_count_str;
|
||||
const char *hdrscan_count_str;
|
||||
int i, count;
|
||||
LIST *l;
|
||||
|
||||
@ -230,7 +230,7 @@ hcache_init()
|
||||
|
||||
count = atoi(includes_count_str);
|
||||
for (l = 0, i = 0; i < count; i++) {
|
||||
char* s = read_netstring(f);
|
||||
const char* s = read_netstring(f);
|
||||
if (!s) {
|
||||
fprintf(stderr, "invalid %s\n", hcachename);
|
||||
goto bail;
|
||||
@ -248,7 +248,7 @@ hcache_init()
|
||||
|
||||
count = atoi(hdrscan_count_str);
|
||||
for (l = 0, i = 0; i < count; i++) {
|
||||
char* s = read_netstring(f);
|
||||
const char* s = read_netstring(f);
|
||||
if (!s) {
|
||||
fprintf(stderr, "invalid %s\n", hcachename);
|
||||
goto bail;
|
||||
@ -283,7 +283,7 @@ hcache_done()
|
||||
FILE *f;
|
||||
HCACHEDATA *c;
|
||||
int header_count = 0;
|
||||
char* hcachename;
|
||||
const char* hcachename;
|
||||
int maxage;
|
||||
|
||||
if (!hcachehash)
|
||||
|
@ -38,9 +38,7 @@
|
||||
|
||||
# ifdef USE_PATHUNIX
|
||||
|
||||
# if defined( OS_MACOSX )
|
||||
/* need unistd for the prototype for getcwd to avoid defaulting return to int on 64bit */
|
||||
/* XXX: others too ? */
|
||||
# if defined( unix )
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user