2006-01-26 Robert Love <rml@novell.com>

* src/Makefile.am, src/kernel-types.h: Now that two different source
	  files are feeling the crack-addled leakage of kernel types such as
	  u32 and s8 -- superior to __u64 and __u8, to be sure, but not valid
	  types in user-space -- define a header and include it as needed.
	* src/nm-device-802-3-ethernet.c: Include kernel-types.h
	* src/nm-device-802-3-ethernet.h: Remove defines.
	* src/wpa.c: Remove defines and include kernel-types.h.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love 2006-01-26 21:55:11 +00:00 committed by Robert Love
parent a386cc6bc9
commit 403272766a
6 changed files with 33 additions and 24 deletions

View file

@ -1,3 +1,13 @@
2006-01-26 Robert Love <rml@novell.com>
* src/Makefile.am, src/kernel-types.h: Now that two different source
files are feeling the crack-addled leakage of kernel types such as
u32 and s8 -- superior to __u64 and __u8, to be sure, but not valid
types in user-space -- define a header and include it as needed.
* src/nm-device-802-3-ethernet.c: Include kernel-types.h
* src/nm-device-802-3-ethernet.h: Remove defines.
* src/wpa.c: Remove defines and include kernel-types.h.
2006-01-26 Robert Love <rml@novell.com>
* TODO: Update. WPA support is in the bag and HAL restarts (should)
@ -524,7 +534,7 @@
- (nmu_create_dbus_error_message): rename parameter 'namespace'
to 'exception_namespace' (:namespace is a keyword in
C++)
2006-01-09 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
@ -1422,7 +1432,7 @@
* configure.in, initscript/SUSE/.cvsignore,
initscript/SUSE/Makefile.am: support new networkmanager-dispatcher
initscript.
2005-12-08 Robert Love <rml@novell.com>
* initscript/SUSE/networkmanager.in: Do not start 'networking' service.

View file

@ -58,6 +58,7 @@ NetworkManager_SOURCES = \
nm-ap-security-wep.h \
nm-ap-security-wpa-psk.c \
nm-ap-security-wpa-psk.h \
kernel-types.h \
wpa.c \
wpa.h \
wpa_ctrl.c \

18
src/kernel-types.h Normal file
View file

@ -0,0 +1,18 @@
#ifndef _KERNEL_TYPES_H
#define _KERNEL_TYPES_H
/*
* Various headers leak the kernel-only types u16, u32, et al. User-space
* does not supply these types, so we define them here.
*/
typedef __u64 u64;
typedef __u32 u32;
typedef __u16 u16;
typedef __u8 u8;
typedef __s64 s64;
typedef __s32 s32;
typedef __s16 s16;
typedef __s8 s8;
#endif /* _KERNEL_TYPES_H */

View file

@ -33,6 +33,7 @@
#include "nm-activation-request.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "kernel-types.h"
#define NM_DEVICE_802_3_ETHERNET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_3_ETHERNET, NMDevice8023EthernetPrivate))

View file

@ -28,18 +28,6 @@
#include "nm-device.h"
/*
* The kernel headers <linux/mii.h> and <linux/ethtool.h> leak the kernel-only
* types u16, u32, et al. User-space does not supply these types, so we define
* them here.
*/
#ifndef u64
# define u64 __u64
# define u32 __u32
# define u16 __u16
# define u8 __u8
#endif
G_BEGIN_DECLS
#define NM_TYPE_DEVICE_802_3_ETHERNET (nm_device_802_3_ethernet_get_type ())

View file

@ -16,19 +16,10 @@
#include <iwlib.h>
#include <glib.h>
#include "kernel-types.h"
#include "wpa.h"
#include "nm-utils.h"
/* crack */
typedef uint64_t u64;
typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
typedef int64_t s64;
typedef int32_t s32;
typedef int16_t s16;
typedef int8_t s8;
#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
#define BIT(n) (1 << (n))