Linux/powerpc and SunOS fixes

This commit is contained in:
Wichert Akkerman 1999-06-22 15:28:30 +00:00
parent 50a2745c88
commit e6f876c49d
4 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
Tue Jun 22 17:26:33 CEST 1999
* Fixed some Linux/powerpc sillyness, thanks to Daniel Jacobowitz
* Fixed some SunOS compile problems earlier that I forgot to include
here
Mon Jun 14 12:44:25 CEST 1999 Mon Jun 14 12:44:25 CEST 1999
* Avoid leakint fd into child when forking, patch from * Avoid leakint fd into child when forking, patch from

4
mem.c
View File

@ -148,11 +148,11 @@ struct tcb *tcp;
#endif /* !LINUX */ #endif /* !LINUX */
if (entering(tcp)) { if (entering(tcp)) {
#if defined(LINUX) && !defined(ALPHA) && !defined(sparc) || defined(POWERPC) #if defined(LINUX) && !defined(ALPHA) && !defined(sparc) && !defined(POWERPC)
if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
(char *) u_arg) == -1) (char *) u_arg) == -1)
return 0; return 0;
#endif /* LINUX && !ALPHA && !sparc && !powerpc*/ #endif /* LINUX && !ALPHA && !sparc && !POWERPC */
/* addr */ /* addr */
if (!u_arg[0]) if (!u_arg[0])

View File

@ -135,7 +135,8 @@ int nerrnos;
int current_personality; int current_personality;
int int
set_personality(int personality) set_personality(personality)
int personality;
{ {
switch (personality) { switch (personality) {
case 0: case 0:
@ -419,7 +420,8 @@ const int socket_map [] = {
}; };
void void
sparc_socket_decode (struct tcb *tcp) sparc_socket_decode (tcp)
struct tcb *tcp;
{ {
volatile long addr; volatile long addr;
volatile int i, n; volatile int i, n;

4
util.c
View File

@ -1092,7 +1092,7 @@ struct tcb *tcp;
#ifdef SUNOS4 #ifdef SUNOS4
#ifdef SPARC /* This code is slightly sparc specific */ #ifdef SPARC /* This code is slightly sparc specific */
struct pt_regs regs; struct regs regs;
#define BPT 0x91d02001 /* ta 1 */ #define BPT 0x91d02001 /* ta 1 */
#define LOOP 0x10800000 /* ba 0 */ #define LOOP 0x10800000 /* ba 0 */
#define LOOPA 0x30800000 /* ba,a 0 */ #define LOOPA 0x30800000 /* ba,a 0 */
@ -1247,7 +1247,7 @@ struct tcb *tcp;
#ifdef SPARC #ifdef SPARC
#if !LOOPA #if !LOOPA
struct pt_regs regs; struct regs regs;
#endif #endif
if (!(tcp->flags & TCB_BPTSET)) { if (!(tcp->flags & TCB_BPTSET)) {