Clean up a bit

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20771 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-02-21 14:44:18 +00:00
parent 92b3407144
commit 15c8ca97ce
2 changed files with 10 additions and 1 deletions

View file

@ -5,6 +5,7 @@
* Source/callframe.m: * Source/callframe.m:
* Source/cifframe.m: * Source/cifframe.m:
Include malloc.h for systems where it is needed for alloca() Include malloc.h for systems where it is needed for alloca()
* Tools/gdomap.c: Avoid some warnings on mingw32
M Source/mframe/mframe.head M Source/mframe/mframe.head
2005-02-21 14:10 Stefan Urbanek <stefan@agentfarms.net> 2005-02-21 14:10 Stefan Urbanek <stefan@agentfarms.net>

View file

@ -129,7 +129,9 @@
#define MAX_EXTRA ((GDO_NAME_MAX_LEN - 2 * IASIZE)/IASIZE) #define MAX_EXTRA ((GDO_NAME_MAX_LEN - 2 * IASIZE)/IASIZE)
typedef unsigned char *uptr; typedef unsigned char *uptr;
#ifndef __MINGW__
static int is_daemon = 0; /* Currently running as daemon. */ static int is_daemon = 0; /* Currently running as daemon. */
#endif
static int debug = 0; /* Extra debug gdomap_logging. */ static int debug = 0; /* Extra debug gdomap_logging. */
static int nobcst = 0; /* turn off broadcast probing. */ static int nobcst = 0; /* turn off broadcast probing. */
static int nofork = 0; /* turn off fork() for debugging. */ static int nofork = 0; /* turn off fork() for debugging. */
@ -159,7 +161,9 @@ struct in_addr class_c_mask;
* Predeclare some of the functions used. * Predeclare some of the functions used.
*/ */
static void dump_stats(); static void dump_stats();
#ifndef __MINGW__
static void dump_tables(); static void dump_tables();
#endif
static void handle_accept(); static void handle_accept();
static void handle_io(); static void handle_io();
static void handle_read(int); static void handle_read(int);
@ -1030,6 +1034,7 @@ dump_stats()
gdomap_log(LOG_INFO); gdomap_log(LOG_INFO);
} }
#ifndef __MINGW__
static void static void
dump_tables() dump_tables()
{ {
@ -1066,6 +1071,7 @@ dump_tables()
gdomap_log(LOG_ERR); gdomap_log(LOG_ERR);
} }
} }
#endif
/* /*
* Name - init_iface() * Name - init_iface()
@ -4569,7 +4575,7 @@ printf(
} }
a[argc] = "-f"; a[argc] = "-f";
a[argc+1] = 0; a[argc+1] = 0;
if (_spawnv(_P_NOWAIT, argv[0], a) == -1) if (_spawnv(_P_NOWAIT, argv[0], (const char* const*)a) == -1)
{ {
fprintf(stderr, "gdomap - spawn '%s' failed - bye.\n", argv[0]); fprintf(stderr, "gdomap - spawn '%s' failed - bye.\n", argv[0]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
@ -4725,8 +4731,10 @@ printf(
#endif #endif
} }
{ {
#ifndef __MINGW__
int uid = -2; int uid = -2;
int gid = -2; int gid = -2;
#endif
#ifdef HAVE_PWD_H #ifdef HAVE_PWD_H
#ifdef HAVE_GETPWNAM #ifdef HAVE_GETPWNAM