git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eff15be
)
Nativelib - Fix clang compilation issues
author
John Hodge
<
[email protected]
>
Sun, 11 May 2014 07:51:41 +0000
(15:51 +0800)
committer
John Hodge
<
[email protected]
>
Sun, 11 May 2014 07:51:41 +0000
(15:51 +0800)
KernelLand/Kernel/drv/proc.c
patch
|
blob
|
history
KernelLand/Kernel/events.c
patch
|
blob
|
history
KernelLand/Modules/IPStack/icmpv6.h
patch
|
blob
|
history
KernelLand/Modules/IPStack/ipv6.h
patch
|
blob
|
history
Makefile
patch
|
blob
|
history
Tools/NetTest_Runner/net.c
patch
|
blob
|
history
Tools/nativelib/include/threads_int.h
patch
|
blob
|
history
diff --git
a/KernelLand/Kernel/drv/proc.c
b/KernelLand/Kernel/drv/proc.c
index
03288ae
..
60bf4dd
100644
(file)
--- a/
KernelLand/Kernel/drv/proc.c
+++ b/
KernelLand/Kernel/drv/proc.c
@@
-50,9
+50,8
@@
tVFS_NodeType gSysFS_DirNodeType = {
.FindDir = SysFS_Comm_FindDir
};
tSysFS_Ent gSysFS_Version_Kernel = {
.FindDir = SysFS_Comm_FindDir
};
tSysFS_Ent gSysFS_Version_Kernel = {
- NULL, NULL, // Nexts
- &gSysFS_Version, // Parent
- {
+ .Parent = &gSysFS_Version, // Parent
+ .Node = {
.Inode = 1, // File #1
.ImplPtr = NULL,
.ImplInt = (Uint)&gSysFS_Version_Kernel, // Self-Link
.Inode = 1, // File #1
.ImplPtr = NULL,
.ImplInt = (Uint)&gSysFS_Version_Kernel, // Self-Link
@@
-61,12
+60,11
@@
tSysFS_Ent gSysFS_Version_Kernel = {
.ACLs = &gVFS_ACL_EveryoneRO,
.Type = &gSysFS_FileNodeType
},
.ACLs = &gVFS_ACL_EveryoneRO,
.Type = &gSysFS_FileNodeType
},
- "Kernel"
+ .Name = {"Kernel"}
};
tSysFS_Ent gSysFS_Version = {
};
tSysFS_Ent gSysFS_Version = {
- NULL, NULL,
- &gSysFS_Root,
- {
+ .Parent = &gSysFS_Root,
+ .Node = {
.Size = 1,
.ImplPtr = &gSysFS_Version_Kernel,
.ImplInt = (Uint)&gSysFS_Version, // Self-Link
.Size = 1,
.ImplPtr = &gSysFS_Version_Kernel,
.ImplInt = (Uint)&gSysFS_Version, // Self-Link
@@
-75,7
+73,7
@@
tSysFS_Ent gSysFS_Version = {
.Flags = VFS_FFLAG_DIRECTORY,
.Type = &gSysFS_DirNodeType
},
.Flags = VFS_FFLAG_DIRECTORY,
.Type = &gSysFS_DirNodeType
},
- "Version"
+ .Name = {"Version"}
};
// Root of the SysFS tree (just used to keep the code clean)
tSysFS_Ent gSysFS_Root = {
};
// Root of the SysFS tree (just used to keep the code clean)
tSysFS_Ent gSysFS_Root = {
@@
-86,7
+84,7
@@
tSysFS_Ent gSysFS_Root = {
.ImplPtr = &gSysFS_Version,
.ImplInt = (Uint)&gSysFS_Root // Self-Link
},
.ImplPtr = &gSysFS_Version,
.ImplInt = (Uint)&gSysFS_Root // Self-Link
},
- "/"
+ {"/"}
};
tDevFS_Driver gSysFS_DriverInfo = {
NULL, "system",
};
tDevFS_Driver gSysFS_DriverInfo = {
NULL, "system",
diff --git
a/KernelLand/Kernel/events.c
b/KernelLand/Kernel/events.c
index
b0225ef
..
ec47a16
100644
(file)
--- a/
KernelLand/Kernel/events.c
+++ b/
KernelLand/Kernel/events.c
@@
-7,8
+7,8
@@
*/
#define DEBUG 0
#include <acess.h>
*/
#define DEBUG 0
#include <acess.h>
-#include <threads_int.h>
#include <events.h>
#include <events.h>
+#include <threads_int.h>
// === CODE ===
void Threads_PostEvent(tThread *Thread, Uint32 EventMask)
// === CODE ===
void Threads_PostEvent(tThread *Thread, Uint32 EventMask)
diff --git
a/KernelLand/Modules/IPStack/icmpv6.h
b/KernelLand/Modules/IPStack/icmpv6.h
index
bda70b1
..
66f6134
100644
(file)
--- a/
KernelLand/Modules/IPStack/icmpv6.h
+++ b/
KernelLand/Modules/IPStack/icmpv6.h
@@
-26,32
+26,32
@@
typedef struct {
Uint16 RouterLifetime; // Seconds, life time as a default router (wtf does that mean?)
Uint32 ReachableTime;
Uint32 RetransTimer; // Miliseconds, time between transmissions of RAs from this router
Uint16 RouterLifetime; // Seconds, life time as a default router (wtf does that mean?)
Uint32 ReachableTime;
Uint32 RetransTimer; // Miliseconds, time between transmissions of RAs from this router
- Uint8 Options[];
+ Uint8 Options[
0
];
} PACKED tICMPv6_RA;
typedef struct {
Uint32 Reserved;
tIPv6 TargetAddress;
} PACKED tICMPv6_RA;
typedef struct {
Uint32 Reserved;
tIPv6 TargetAddress;
- Uint8 Options[];
+ Uint8 Options[
0
];
} PACKED tICMPv6_NS;
typedef struct {
Uint32 Flags;
tIPv6 TargetAddress;
} PACKED tICMPv6_NS;
typedef struct {
Uint32 Flags;
tIPv6 TargetAddress;
- Uint8 Options[];
+ Uint8 Options[
0
];
} PACKED tICMPv6_NA;
typedef struct {
Uint32 Reserved;
tIPv6 TargetAddress;
tIPv6 DestinationAddress;
} PACKED tICMPv6_NA;
typedef struct {
Uint32 Reserved;
tIPv6 TargetAddress;
tIPv6 DestinationAddress;
- Uint8 Options[];
+ Uint8 Options[
0
];
} PACKED tICMPv6_Redirect;
typedef struct {
Uint8 Type; // 1,2
Uint8 Length; // Length of field in units of 8 bytes (incl header), typically 1
} PACKED tICMPv6_Redirect;
typedef struct {
Uint8 Type; // 1,2
Uint8 Length; // Length of field in units of 8 bytes (incl header), typically 1
- Uint8 Address[];
+ Uint8 Address[
0
];
} PACKED tICMPv6_Opt_LinkAddr;
typedef struct {
} PACKED tICMPv6_Opt_LinkAddr;
typedef struct {
@@
-62,7
+62,7
@@
typedef struct {
Uint32 ValidLifetime;
Uint32 PreferredLifetime;
Uint32 _reserved2;
Uint32 ValidLifetime;
Uint32 PreferredLifetime;
Uint32 _reserved2;
- tIPv6 Prefix[];
+ tIPv6 Prefix[
0
];
} PACKED tICMPv6_Opt_Prefix;
typedef struct {
} PACKED tICMPv6_Opt_Prefix;
typedef struct {
@@
-70,7
+70,7
@@
typedef struct {
Uint8 Length;
Uint16 _rsvd1;
Uint32 _rsvd2;
Uint8 Length;
Uint16 _rsvd1;
Uint32 _rsvd2;
- Uint8 Data[
];
// All or part of the redirected message (not exceeding MTU)
+ Uint8 Data[
0];
// All or part of the redirected message (not exceeding MTU)
} PACKED tICMPv6_Opt_Redirect;
typedef struct {
} PACKED tICMPv6_Opt_Redirect;
typedef struct {
diff --git
a/KernelLand/Modules/IPStack/ipv6.h
b/KernelLand/Modules/IPStack/ipv6.h
index
35cd742
..
fec00f7
100644
(file)
--- a/
KernelLand/Modules/IPStack/ipv6.h
+++ b/
KernelLand/Modules/IPStack/ipv6.h
@@
-32,7
+32,7
@@
struct sIPv6Header
Uint8 HopLimit;
tIPv6 Source;
tIPv6 Destination;
Uint8 HopLimit;
tIPv6 Source;
tIPv6 Destination;
- char Data[];
+ char Data[
0
];
};
#define IPV6_ETHERNET_ID 0x86DD
};
#define IPV6_ETHERNET_ID 0x86DD
diff --git
a/Makefile
b/Makefile
index
d78686b
..
c3c26c1
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-8,8
+8,7
@@
.PHONY: all clean SyscallList all-user
.PHONY: all clean SyscallList all-user
-SUBMAKE = $(MAKE)
-# --no-print-directory
+SUBMAKE = $(MAKE) --no-print-directory
USRLIBS := crt0.o acess.ld ld-acess.so libc.so libc++.so libposix.so
USRLIBS += libreadline.so libnet.so liburi.so libpsocket.so
USRLIBS := crt0.o acess.ld ld-acess.so libc.so libc++.so libposix.so
USRLIBS += libreadline.so libnet.so liburi.so libpsocket.so
diff --git
a/Tools/NetTest_Runner/net.c
b/Tools/NetTest_Runner/net.c
index
231df50
..
4cbf3c8
100644
(file)
--- a/
Tools/NetTest_Runner/net.c
+++ b/
Tools/NetTest_Runner/net.c
@@
-9,6
+9,8
@@
#include <sys/select.h>
#include "net.h"
#include <stdint.h>
#include <sys/select.h>
#include "net.h"
#include <stdint.h>
+#include <unistd.h> // unlink/...
+#include <sys/time.h> // gettimeofday
#define CONNECT_TIMEOUT 10*1000
#define MAX_IFS 4
#define CONNECT_TIMEOUT 10*1000
#define MAX_IFS 4
@@
-145,7
+147,7
@@
size_t Net_Receive(int IfNum, size_t MaxLen, void *DestBuf, unsigned int Timeout
if( Net_int_EnsureConnected(IfNum) && WaitOnFD(If->FD, false, Timeout) )
{
if( Net_int_EnsureConnected(IfNum) && WaitOnFD(If->FD, false, Timeout) )
{
- size_t rv = recvfrom(If->FD, DestBuf, MaxLen, 0, &If->addr, &If->addrlen);
+ size_t rv = recvfrom(If->FD, DestBuf, MaxLen, 0,
(struct sockaddr*)
&If->addr, &If->addrlen);
Net_int_SavePacket(If, rv, DestBuf);
return rv;
}
Net_int_SavePacket(If, rv, DestBuf);
return rv;
}
@@
-160,7
+162,7
@@
void Net_Send(int IfNum, size_t Length, const void *Buf)
if( !WaitOnFD(If->FD, true, CONNECT_TIMEOUT) )
return ;
Net_int_SavePacket(If, Length, Buf);
if( !WaitOnFD(If->FD, true, CONNECT_TIMEOUT) )
return ;
Net_int_SavePacket(If, Length, Buf);
- int rv = sendto(If->FD, Buf, Length, 0, &If->addr, If->addrlen);
+ int rv = sendto(If->FD, Buf, Length, 0,
(struct sockaddr*)
&If->addr, If->addrlen);
if( rv < 0 )
perror("Net_Send - send");
}
if( rv < 0 )
perror("Net_Send - send");
}
diff --git
a/Tools/nativelib/include/threads_int.h
b/Tools/nativelib/include/threads_int.h
index
7bd91c1
..
08bb4f7
100644
(file)
--- a/
Tools/nativelib/include/threads_int.h
+++ b/
Tools/nativelib/include/threads_int.h
@@
-103,12
+103,12
@@
extern int Threads_int_CreateThread(struct sThread *Thread);
extern int Threads_int_ThreadingEnabled(void);
extern int Threads_int_ThreadingEnabled(void);
-extern
tThread
*Proc_GetCurThread(void);
-extern
tThread
*Threads_RemActive(void);
-extern void Threads_AddActive(
t
Thread *Thread);
+extern
struct sThread
*Proc_GetCurThread(void);
+extern
struct sThread
*Threads_RemActive(void);
+extern void Threads_AddActive(
struct s
Thread *Thread);
extern void Threads_int_WaitForStatusEnd(enum eThreadStatus Status);
extern void Threads_int_WaitForStatusEnd(enum eThreadStatus Status);
-extern int Threads_int_Sleep(enum eThreadStatus Status, void *Ptr, int Num,
tThread **ListHead, t
Thread **ListTail, tShortSpinlock *Lock);
-extern void Semaphore_ForceWake(
t
Thread *Thread);
+extern int Threads_int_Sleep(enum eThreadStatus Status, void *Ptr, int Num,
struct sThread **ListHead, struct s
Thread **ListTail, tShortSpinlock *Lock);
+extern void Semaphore_ForceWake(
struct s
Thread *Thread);
extern tThreadIntMutex *Threads_int_MutexCreate(void);
extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
extern tThreadIntMutex *Threads_int_MutexCreate(void);
extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
UCC
git Repository :: git.ucc.asn.au