Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some fixes to allow building with gcc44.

Most of them for type redefinitions which gcc47 has stopped warning about
(if they are compatible).

The libstdc++ fix is modeled after gcc47's libstdc++. We don't have
__libc_C_ctype_[] anymore.
  • Loading branch information...
commit 381fa6da48f61b44a92fbaf73b2f65e40c705e14 1 parent a832fc0
Sascha Wildner authored
8 contrib/gcc-4.4/libstdc++-v3/config/os/bsd/dragonfly/ctype_noninline.h
View
@@ -34,15 +34,17 @@
// Information as gleaned from /usr/include/ctype.h
-#ifdef _CTYPE_S
- extern "C" const unsigned long __libc_C_ctype_[];
-#else
+#ifndef _CTYPE_S
extern "C" const __uint16_t __libc_C_ctype_[];
#endif
const ctype_base::mask*
ctype<char>::classic_table() throw()
+#ifdef _CTYPE_S
+ { return 0; }
+#else
{ return __libc_C_ctype_ + 1; }
+#endif
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
2  lib/libc/sysvipc/sockets.c
View
@@ -281,7 +281,7 @@ send_msg_with_cred(int sock, char *buffer, size_t size) {
int
receive_msg_with_cred(int sock, char *buffer, size_t size,
struct cmsgcred *cred) {
- struct msghdr msg = {0};
+ struct msghdr msg = { .msg_name = NULL };
struct iovec vec;
ssize_t n;
int result;
4 share/mk/bsd.sys.mk
View
@@ -47,7 +47,11 @@ CWARNFLAGS += -Wchar-subscripts -Winline -Wnested-externs\
. if ${WARNS} >= 2 && ${WARNS} <= 4
# XXX Delete -Wmaybe-uninitialized by default for now -- the compiler doesn't
# XXX always get it right.
+. if ${CCVER} == "gcc47"
CWARNFLAGS += -Wno-maybe-uninitialized
+. else
+CWARNFLAGS += -Wno-uninitialized
+. endif
. endif
# Activate gcc47's -Wunused-but-set-variable (which is in -Wall) and
# -Wunused-but-set-parameter (which is in -Wextra) only at WARNS >= 4
2  sys/dev/drm/include/drm/drmP.h
View
@@ -668,8 +668,6 @@ struct drm_ati_pcigart_info {
struct drm_dma_handle *dmah; /* handle for ATI PCIGART table */
};
-typedef vm_paddr_t resource_size_t;
-
/**
* GEM specific mm private for tracking GEM objects
*/
1  sys/dev/drm/include/linux/types.h
View
@@ -50,7 +50,6 @@ typedef _Bool bool;
typedef u64 phys_addr_t;
typedef unsigned long kernel_ulong_t;
-typedef unsigned int uint;
typedef unsigned gfp_t;
typedef uint64_t loff_t;
typedef vm_paddr_t resource_size_t;
1  sys/dev/netif/ath/ath_hal/ar5416/ar5416_reset.c
View
@@ -2439,6 +2439,7 @@ ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah,
int16_t minDelta = 0;
CHAN_CENTERS centers;
+ minPwrT4[0] = 0; /* XXX make gcc44 happy */
ar5416GetChannelCenters(ah, chan, &centers);
/* Trim numPiers for the number of populated channel Piers */
6 sys/platform/pc32/include/pmap.h
View
@@ -303,8 +303,14 @@ extern vm_offset_t clean_eva;
extern vm_offset_t clean_sva;
extern char *ptvmmap; /* poor name! */
+#ifndef __VM_PAGE_T_DEFINED__
+#define __VM_PAGE_T_DEFINED__
typedef struct vm_page *vm_page_t;
+#endif
+#ifndef __VM_MEMATTR_T_DEFINED__
+#define __VM_MEMATTR_T_DEFINED__
typedef char vm_memattr_t;
+#endif
void pmap_release(struct pmap *pmap);
void pmap_interlock_wait (struct vmspace *);
6 sys/platform/pc64/include/pmap.h
View
@@ -351,8 +351,14 @@ extern vm_offset_t clean_eva;
extern vm_offset_t clean_sva;
extern char *ptvmmap; /* poor name! */
+#ifndef __VM_PAGE_T_DEFINED__
+#define __VM_PAGE_T_DEFINED__
typedef struct vm_page *vm_page_t;
+#endif
+#ifndef __VM_MEMATTR_T_DEFINED__
+#define __VM_MEMATTR_T_DEFINED__
typedef char vm_memattr_t;
+#endif
void pmap_release(struct pmap *pmap);
void pmap_interlock_wait (struct vmspace *);
6 sys/platform/vkernel/include/pmap.h
View
@@ -176,8 +176,14 @@ extern char *ptvmmap; /* poor name! */
extern vm_offset_t clean_sva;
extern vm_offset_t clean_eva;
+#ifndef __VM_PAGE_T_DEFINED__
+#define __VM_PAGE_T_DEFINED__
typedef struct vm_page *vm_page_t;
+#endif
+#ifndef __VM_MEMATTR_T_DEFINED__
+#define __VM_MEMATTR_T_DEFINED__
typedef char vm_memattr_t;
+#endif
void pmap_bootstrap (void);
void *pmap_mapdev (vm_paddr_t, vm_size_t);
7 sys/platform/vkernel64/include/pmap.h
View
@@ -43,7 +43,6 @@
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
* $FreeBSD: src/sys/i386/include/pmap.h,v 1.65.2.3 2001/10/03 07:15:37 peter Exp $
- * $DragonFly: src/sys/platform/vkernel/include/pmap.h,v 1.4 2007/07/01 02:51:44 dillon Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -203,8 +202,14 @@ extern char *ptvmmap; /* poor name! */
extern vm_offset_t clean_sva;
extern vm_offset_t clean_eva;
+#ifndef __VM_PAGE_T_DEFINED__
+#define __VM_PAGE_T_DEFINED__
typedef struct vm_page *vm_page_t;
+#endif
+#ifndef __VM_MEMATTR_T_DEFINED__
+#define __VM_MEMATTR_T_DEFINED__
typedef char vm_memattr_t;
+#endif
void pmap_bootstrap(vm_paddr_t *, int64_t);
void *pmap_mapdev (vm_paddr_t, vm_size_t);
6 sys/sys/stdint.h
View
@@ -29,8 +29,14 @@
#ifndef __cplusplus
typedef int __wchar_t;
#endif
+#ifndef ___WINT_T_DECLARED
typedef int __wint_t;
+#define ___WINT_T_DECLARED
+#endif
+#ifndef ___RUNE_T_DECLARED
typedef int __rune_t;
+#define ___RUNE_T_DECLARED
+#endif
typedef void *__wctrans_t;
typedef void *__wctype_t;
6 sys/sys/types.h
View
@@ -256,8 +256,14 @@ __END_DECLS
* must be at least 16 bits.
*/
typedef int __ct_rune_t; /* arg type for ctype funcs */
+#ifndef ___RUNE_T_DECLARED
typedef __ct_rune_t __rune_t; /* rune_t (see above) */
+#define ___RUNE_T_DECLARED
+#endif
+#ifndef ___WINT_T_DECLARED
typedef __ct_rune_t __wint_t; /* wint_t (see above) */
+#define ___WINT_T_DECLARED
+#endif
/*
* Also required for locale support
3  sys/vm/vm.h
View
@@ -121,7 +121,10 @@ typedef struct vm_page *vm_page_t;
/* Memory attributes. */
+#ifndef __VM_MEMATTR_T_DEFINED__
+#define __VM_MEMATTR_T_DEFINED__
typedef char vm_memattr_t;
+#endif
#define VM_MEMATTR_UNCACHEABLE ((vm_memattr_t)PAT_UNCACHEABLE)
#define VM_MEMATTR_WRITE_COMBINING ((vm_memattr_t)PAT_WRITE_COMBINING)
Please sign in to comment.
Something went wrong with that request. Please try again.