summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2016-01-22 21:33:49 -0500
committerRichard Lowe <richlowe@richlowe.net>2016-02-14 16:10:58 -0500
commit7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7 (patch)
tree83384b7f044313da245f28f302ce70d7db5e2ab1 /usr/src
parenteae164eb03cbb004dcf9154f36352e62f693eb6c (diff)
downloadillumos-joyent-7f11fd00fc23e2af7ae21cc8837a2b86380dcfa7.tar.gz
6648 illumos build should be explicit about C standards
Reviewed by: Andy Stormont <andyjstormont@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/awk/Makefile2
-rw-r--r--usr/src/cmd/sgs/elfdump/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/tools/Makefile.com3
-rw-r--r--usr/src/cmd/sgs/tools/Makefile.targ12
-rw-r--r--usr/src/cmd/zic/Makefile10
-rw-r--r--usr/src/grub/grub-0.97/Makefile.solaris.defs2
-rw-r--r--usr/src/grub/grub-0.97/netboot/io.h17
-rw-r--r--usr/src/lib/libc/amd64/Makefile2
-rw-r--r--usr/src/lib/libc/i386/Makefile.com2
-rw-r--r--usr/src/lib/libc/sparc/Makefile.com2
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile.com2
-rw-r--r--usr/src/lib/libm/Makefile.libm.com14
-rw-r--r--usr/src/lib/libm/amd64/src/libm_inlines.h26
-rw-r--r--usr/src/lib/libm/common/m9x/fenv_inlines.h136
-rw-r--r--usr/src/lib/libm/i386/src/libm_inlines.h70
-rw-r--r--usr/src/lib/libm/sparc/src/libm_inlines.h24
-rw-r--r--usr/src/lib/libm/sparcv9/src/libm_inlines.h24
-rw-r--r--usr/src/lib/libsqlite/Makefile.com2
-rw-r--r--usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs4
-rw-r--r--usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c8
-rw-r--r--usr/src/uts/i86pc/Makefile.rules4
-rw-r--r--usr/src/uts/i86pc/genassym/Makefile4
-rw-r--r--usr/src/uts/i86pc/ml/genassym.c6
-rw-r--r--usr/src/uts/i86xpv/Makefile.rules3
-rw-r--r--usr/src/uts/i86xpv/genassym/Makefile5
-rw-r--r--usr/src/uts/intel/audioemu10k/Makefile2
26 files changed, 193 insertions, 195 deletions
diff --git a/usr/src/cmd/awk/Makefile b/usr/src/cmd/awk/Makefile
index f0261a4bf2..3eb805c71a 100644
--- a/usr/src/cmd/awk/Makefile
+++ b/usr/src/cmd/awk/Makefile
@@ -77,7 +77,7 @@ proctab.c: maketab
rm -f $@; ./maketab > $@
maketab: maketab.c
- $(NATIVECC) -O maketab.c -o $@ $(LDLIBS)
+ $(NATIVECC) $(NATIVE_CFLAGS) maketab.c -o $@ $(LDLIBS)
install: all $(ROOTPROG) $(ROOTLINK)
diff --git a/usr/src/cmd/sgs/elfdump/Makefile.targ b/usr/src/cmd/sgs/elfdump/Makefile.targ
index f4d74fa9c6..5cb4d96437 100644
--- a/usr/src/cmd/sgs/elfdump/Makefile.targ
+++ b/usr/src/cmd/sgs/elfdump/Makefile.targ
@@ -65,7 +65,7 @@ gen_layout_obj.o := CFLAGS64 += $(CTF_FLAGS)
gen_layout_obj.o := POST_PROCESS_O = $(CTFCONVERT_O)
gen_struct_layout: ../common/gen_struct_layout.c
- $(NATIVECC) $(NATIVECC_CFLAGS) -o $@ \
+ $(NATIVECC) $(NATIVE_CFLAGS) -o $@ \
../common/gen_struct_layout.c -lctf
clean:
diff --git a/usr/src/cmd/sgs/tools/Makefile.com b/usr/src/cmd/sgs/tools/Makefile.com
index 75c6dee092..6c7ba8f99d 100644
--- a/usr/src/cmd/sgs/tools/Makefile.com
+++ b/usr/src/cmd/sgs/tools/Makefile.com
@@ -44,7 +44,6 @@ COMOBJS=
NATOBJS= piglatin.o
OBJECTS= $(COMOBJS) $(NATOBJS)
-NATIVECC_CFLAGS = -O
AVLOBJ= avl.o
TOOL_OBJS= sgsmsg.o string_table.o findprime.o assfail.o
@@ -52,7 +51,7 @@ SGSMSG_OBJS= $(TOOL_OBJS) $(AVLOBJ)
SGSMSG_SRCS= $(TOOL_OBJS:%.o=../common/%.c) \
$(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c)
-$(SGSMSG_OBJS) := NATIVECC_CFLAGS += -I../../include $(VAR_TOOLS_CPPFLAGS)
+$(SGSMSG_OBJS) := NATIVE_CFLAGS += -I../../include $(VAR_TOOLS_CPPFLAGS)
PROGS= $(COMOBJS:%.o=%)
NATIVE= $(NATOBJS:%.o=%) sgsmsg
diff --git a/usr/src/cmd/sgs/tools/Makefile.targ b/usr/src/cmd/sgs/tools/Makefile.targ
index a1f5305117..5ae70de358 100644
--- a/usr/src/cmd/sgs/tools/Makefile.targ
+++ b/usr/src/cmd/sgs/tools/Makefile.targ
@@ -20,12 +20,10 @@
# CDDL HEADER END
#
#
-# ident "%Z%%M% %I% %E% SMI"
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# cmd/sgs/tools/Makefile.targ
$(ROOTDIR)/bin/%: %
@@ -35,22 +33,22 @@ $(ROOTDIR)/lib/%: %
$(INS.file)
sgsmsg: $(SGSMSG_OBJS)
- $(NATIVECC) $(DEBUG) $(NATIVECC_CFLAGS) \
+ $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) \
-o $@ $(SGSMSG_OBJS)
sgsmsg.o: ../common/sgsmsg.c
- $(NATIVECC) $(DEBUG) $(NATIVECC_CFLAGS) -c ../common/sgsmsg.c
+ $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c ../common/sgsmsg.c
string_table.o: ../common/string_table.c
- $(NATIVECC) $(DEBUG) $(NATIVECC_CFLAGS) -c \
+ $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c \
../common/string_table.c
avl.o: $(VAR_AVLDIR)/avl.c
- $(NATIVECC) $(DEBUG) $(NATIVECC_CFLAGS) -c \
+ $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c \
$(VAR_AVLDIR)/avl.c
piglatin: ../common/piglatin.c
- $(NATIVECC) $(NATIVECC_CFLAGS) -o $@ ../common/piglatin.c
+ $(NATIVECC) $(NATIVE_CFLAGS) -o $@ ../common/piglatin.c
%: %.o
$(LINK.c) -o $@ $< $(LDLIBS)
diff --git a/usr/src/cmd/zic/Makefile b/usr/src/cmd/zic/Makefile
index 43a2db0ba0..5984f9a689 100644
--- a/usr/src/cmd/zic/Makefile
+++ b/usr/src/cmd/zic/Makefile
@@ -66,7 +66,7 @@ install: all $(DIRS) $(ROOTTZSRCD) $(ROOTTZTABD) $(ROOTUSRSBINPROG) \
$(NPROG) -d $(ROOTTZD) $(TZFILES)
$(NPROG): $(NATIVE) $(NOBJS)
- $(NATIVECC) -o $@ $(NOBJS)
+ $(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(NOBJS)
#
# XXX
@@ -95,16 +95,10 @@ clean:
lint: lint_SRCS
$(NOBJS): $$(@F:.o=.c)
- $(NATIVECC) -O $(NCPPFLAGS) -c -o $@ $(@F:.o=.c)
+ $(NATIVECC) -O $(NATIVE_CFLAGS) $(NCPPFLAGS) -c -o $@ $(@F:.o=.c)
$(NATIVE)/zic.o: $(NATIVE)/tzfile.h
-#$(NATIVE)/scheck.o: scheck.c
-# $(NATIVECC) -c -o $@ scheck.c
-
-#$(NATIVE)/ialloc.o: ialloc.c
-# $(NATIVECC) -c -o $@ ialloc.c
-
$(NATIVE)/tzfile.h: $(ROOT)/usr/include/tzfile.h
$(RM) $@; cp $(ROOT)/usr/include/tzfile.h $@
diff --git a/usr/src/grub/grub-0.97/Makefile.solaris.defs b/usr/src/grub/grub-0.97/Makefile.solaris.defs
index 9a9455ea76..e66071b064 100644
--- a/usr/src/grub/grub-0.97/Makefile.solaris.defs
+++ b/usr/src/grub/grub-0.97/Makefile.solaris.defs
@@ -42,7 +42,7 @@ OPTION_DOCS = $(POUND_SIGN)
OPTION_FS = $(POUND_SIGN)
-BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
+BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) -std=gnu89
BASE_CCASFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS)
BASE_LDFLAGS =
diff --git a/usr/src/grub/grub-0.97/netboot/io.h b/usr/src/grub/grub-0.97/netboot/io.h
index a6e4880e3f..7593419e32 100644
--- a/usr/src/grub/grub-0.97/netboot/io.h
+++ b/usr/src/grub/grub-0.97/netboot/io.h
@@ -1,7 +1,8 @@
+#include <sys/ccompile.h>
+
#ifndef IO_H
#define IO_H
-
/* Amount of relocation etherboot is experiencing */
extern unsigned long virt_offset;
@@ -107,7 +108,7 @@ static inline void iounmap(void *virt_addr __unused)
* Some non intel clones support out of order store. wmb() ceases to be a
* nop for these.
*/
-
+
#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
#define rmb() mb()
#define wmb() mb();
@@ -119,7 +120,8 @@ static inline void iounmap(void *virt_addr __unused)
#define __OUT1(s,x) \
extern void __out##s(unsigned x value, unsigned short port); \
-extern inline void __out##s(unsigned x value, unsigned short port) {
+extern __GNU_INLINE \
+void __out##s(unsigned x value, unsigned short port) {
#define __OUT2(s,s1,s2) \
__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
@@ -132,7 +134,8 @@ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
#define __IN1(s,x) \
extern unsigned x __in##s(unsigned short port); \
-extern inline unsigned x __in##s(unsigned short port) { unsigned x _v;
+extern __GNU_INLINE \
+unsigned x __in##s(unsigned short port) { unsigned x _v;
#define __IN2(s,s1,s2) \
__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
@@ -145,13 +148,15 @@ __IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; r
#define __INS(s) \
extern void ins##s(unsigned short port, void * addr, unsigned long count); \
-extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
+extern __GNU_INLINE \
+void ins##s(unsigned short port, void * addr, unsigned long count) \
{ __asm__ __volatile__ ("cld ; rep ; ins" #s \
: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
#define __OUTS(s) \
extern void outs##s(unsigned short port, const void * addr, unsigned long count); \
-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
+extern __GNU_INLINE \
+void outs##s(unsigned short port, const void * addr, unsigned long count) \
{ __asm__ __volatile__ ("cld ; rep ; outs" #s \
: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index 831d8f15e6..9da581df4e 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -1227,7 +1227,7 @@ $(ASSYMDEP_OBJS:%=pics/%): assym.h
GENASSYM_C = genassym.c
genassym: $(GENASSYM_C)
- $(NATIVECC) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \
+ $(NATIVECC) $(NATIVE_CFLAGS) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \
-o $@ $(GENASSYM_C)
OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index 68c2660a2e..62e6fe5d5e 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -1308,7 +1308,7 @@ $(ASSYMDEP_OBJS:%=pics/%): assym.h
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
genassym: $(GENASSYM_C)
- $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
+ $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
-D__EXTENSIONS__ $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com
index ce767f688c..6a0f6b6fe4 100644
--- a/usr/src/lib/libc/sparc/Makefile.com
+++ b/usr/src/lib/libc/sparc/Makefile.com
@@ -1386,7 +1386,7 @@ assym.h := CFLAGS += -g
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
genassym: $(GENASSYM_C)
- $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
+ $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
$(CPPFLAGS.native) -o $@ $(GENASSYM_C)
OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com
index e3731ab1e4..71d5b604b3 100644
--- a/usr/src/lib/libc/sparcv9/Makefile.com
+++ b/usr/src/lib/libc/sparcv9/Makefile.com
@@ -1300,7 +1300,7 @@ assym.h := CFLAGS64 += -g
GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
genassym: $(GENASSYM_C)
- $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
+ $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
$(CPPFLAGS.native) -o $@ $(GENASSYM_C)
OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
diff --git a/usr/src/lib/libm/Makefile.libm.com b/usr/src/lib/libm/Makefile.libm.com
index 0a8904be2b..ffa6c888d4 100644
--- a/usr/src/lib/libm/Makefile.libm.com
+++ b/usr/src/lib/libm/Makefile.libm.com
@@ -23,13 +23,19 @@ ASSUFFIX_sparc = S
ASSUFFIX_i386 = s
ASSUFFIX = $(ASSUFFIX_$(MACH))
-# C99MODE of neither enabled nor disabled is "no_lib", whereby we expect
-# C99-the-language, but don't modify the behaviour of library routines. This
-# is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
+# With studio C99MODE of neither enabled nor disabled is "no_lib", whereby we
+# expect C99-the-language, but don't modify the behaviour of library routines.
+# This is VERY IMPORTANT, as -xc99=%all, for instance, would link us with
# values-xpg6, which would introduce an __xpg6 to our object with the C99
# flags set, causing us to default C99 libm behaviour on, breaking
# compatibility.
+#
+# We must then, unfortunately, defeat the GNU compiler _defaulting_ to C99, by
+# in that case setting it back to gnu89, which _also_ accepts C99 syntax as
+# far as is important.
C99MODE =
+CFLAGS += -_gcc=-std=gnu89
+CFLAGS64 += -_gcc=-std=gnu89
M4FLAGS = -D__STDC__ -DPIC
@@ -49,7 +55,7 @@ CPPFLAGS += -I$(LIBMSRC)/C \
# GCC needs __C99FEATURES__ such that the implementations of isunordered,
# isgreaterequal, islessequal, etc, exist. This is basically equivalent to
# providing no -xc99 to Studio, in that it gets us the C99 language features,
-# but not values-xpg6, the reason for which is outline with C99MODE.
+# but not values-xpg6, the reason for which is outlined with C99MODE.
CFLAGS += -_gcc=-D__C99FEATURES__
CFLAGS64 += -_gcc=-D__C99FEATURES__
diff --git a/usr/src/lib/libm/amd64/src/libm_inlines.h b/usr/src/lib/libm/amd64/src/libm_inlines.h
index d69c79bfcb..b0dee03bdf 100644
--- a/usr/src/lib/libm/amd64/src/libm_inlines.h
+++ b/usr/src/lib/libm/amd64/src/libm_inlines.h
@@ -45,7 +45,7 @@ extern "C" {
#include <sys/types.h>
#include <sys/ieeefp.h>
-extern __inline__ float
+extern __GNU_INLINE float
__inline_sqrtf(float a)
{
float ret;
@@ -54,7 +54,7 @@ __inline_sqrtf(float a)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
__inline_sqrt(double a)
{
double ret;
@@ -63,7 +63,7 @@ __inline_sqrt(double a)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
__ieee754_sqrt(double a)
{
return (__inline_sqrt(a));
@@ -75,7 +75,7 @@ __ieee754_sqrt(double a)
* 10 - 53 bits
* 11 - 64 bits
*/
-extern __inline__ int
+extern __GNU_INLINE int
__swapRP(int i)
{
int ret;
@@ -97,7 +97,7 @@ __swapRP(int i)
* 10 - Round up
* 11 - Chop
*/
-extern __inline__ enum fp_direction_type
+extern __GNU_INLINE enum fp_direction_type
__swap87RD(enum fp_direction_type i)
{
int ret;
@@ -113,7 +113,7 @@ __swap87RD(enum fp_direction_type i)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
abs(int i)
{
int ret;
@@ -127,7 +127,7 @@ abs(int i)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
copysign(double d1, double d2)
{
double tmpd;
@@ -143,7 +143,7 @@ copysign(double d1, double d2)
return (d1);
}
-extern __inline__ double
+extern __GNU_INLINE double
fabs(double d)
{
double tmp;
@@ -157,7 +157,7 @@ fabs(double d)
return (d);
}
-extern __inline__ float
+extern __GNU_INLINE float
fabsf(float d)
{
__asm__ __volatile__(
@@ -168,7 +168,7 @@ fabsf(float d)
return (d);
}
-extern __inline__ int
+extern __GNU_INLINE int
finite(double d)
{
long ret = 0x7fffffffffffffff;
@@ -187,7 +187,7 @@ finite(double d)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
signbit(double d)
{
long ret;
@@ -200,13 +200,13 @@ signbit(double d)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
sqrt(double d)
{
return (__inline_sqrt(d));
}
-extern __inline__ float
+extern __GNU_INLINE float
sqrtf(float f)
{
return (__inline_sqrtf(f));
diff --git a/usr/src/lib/libm/common/m9x/fenv_inlines.h b/usr/src/lib/libm/common/m9x/fenv_inlines.h
index 945ec424d0..39056f7886 100644
--- a/usr/src/lib/libm/common/m9x/fenv_inlines.h
+++ b/usr/src/lib/libm/common/m9x/fenv_inlines.h
@@ -39,7 +39,7 @@ union fp_cwsw {
} words;
};
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_getcwsw(unsigned int *value)
{
union fp_cwsw *u = (union fp_cwsw *)value;
@@ -50,7 +50,7 @@ __fenv_getcwsw(unsigned int *value)
: "=m" (u->words.cw), "=m" (u->words.sw));
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_setcwsw(const unsigned int *value)
{
union fp_cwsw cwsw;
@@ -71,19 +71,19 @@ __fenv_setcwsw(const unsigned int *value)
"st(6)", "st(7)");
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_getmxcsr(unsigned int *value)
{
__asm__ __volatile__("stmxcsr %0" : "=m" (*value));
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_setmxcsr(const unsigned int *value)
{
__asm__ __volatile__("ldmxcsr %0" : : "m" (*value));
}
-extern __inline__ long double
+extern __GNU_INLINE long double
f2xm1(long double x)
{
long double ret;
@@ -92,7 +92,7 @@ f2xm1(long double x)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fyl2x(long double y, long double x)
{
long double ret;
@@ -104,7 +104,7 @@ fyl2x(long double y, long double x)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fptan(long double x)
{
/*
@@ -121,7 +121,7 @@ fptan(long double x)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fpatan(long double x, long double y)
{
long double ret;
@@ -133,28 +133,28 @@ fpatan(long double x, long double y)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fxtract(long double x)
{
__asm__ __volatile__("fxtract" : "+t" (x) : : "cc");
return (x);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fprem1(long double idend, long double div)
{
__asm__ __volatile__("fprem1" : "+t" (div) : "u" (idend) : "cc");
return (div);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fprem(long double idend, long double div)
{
__asm__ __volatile__("fprem" : "+t" (div) : "u" (idend) : "cc");
return (div);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fyl2xp1(long double y, long double x)
{
long double ret;
@@ -166,14 +166,14 @@ fyl2xp1(long double y, long double x)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fsqrt(long double x)
{
__asm__ __volatile__("fsqrt" : "+t" (x) : : "cc");
return (x);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fsincos(long double x)
{
long double dummy;
@@ -182,14 +182,14 @@ fsincos(long double x)
return (x);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
frndint(long double x)
{
__asm__ __volatile__("frndint" : "+t" (x) : : "cc");
return (x);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fscale(long double x, long double y)
{
long double ret;
@@ -198,21 +198,21 @@ fscale(long double x, long double y)
return (ret);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fsin(long double x)
{
__asm__ __volatile__("fsin" : "+t" (x) : : "cc");
return (x);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fcos(long double x)
{
__asm__ __volatile__("fcos" : "+t" (x) : : "cc");
return (x);
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpeqss(float *f1, float *f2, int *i1)
{
__asm__ __volatile__(
@@ -223,7 +223,7 @@ sse_cmpeqss(float *f1, float *f2, int *i1)
: "cc");
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpltss(float *f1, float *f2, int *i1)
{
__asm__ __volatile__(
@@ -234,7 +234,7 @@ sse_cmpltss(float *f1, float *f2, int *i1)
: "cc");
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpless(float *f1, float *f2, int *i1)
{
__asm__ __volatile__(
@@ -245,7 +245,7 @@ sse_cmpless(float *f1, float *f2, int *i1)
: "cc");
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpunordss(float *f1, float *f2, int *i1)
{
__asm__ __volatile__(
@@ -256,7 +256,7 @@ sse_cmpunordss(float *f1, float *f2, int *i1)
: "cc");
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_minss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -266,7 +266,7 @@ sse_minss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_maxss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -276,7 +276,7 @@ sse_maxss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_addss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -286,7 +286,7 @@ sse_addss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_subss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -296,7 +296,7 @@ sse_subss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_mulss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -306,7 +306,7 @@ sse_mulss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_divss(float *f1, float *f2, float *f3)
{
__asm__ __volatile__(
@@ -316,7 +316,7 @@ sse_divss(float *f1, float *f2, float *f3)
: "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_sqrtss(float *f1, float *f2)
{
double tmp;
@@ -328,20 +328,20 @@ sse_sqrtss(float *f1, float *f2)
: "m" (*f1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_ucomiss(float *f1, float *f2)
{
__asm__ __volatile__("ucomiss %1, %0" : : "x" (*f1), "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_comiss(float *f1, float *f2)
{
__asm__ __volatile__("comiss %1, %0" : : "x" (*f1), "x" (*f2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtss2sd(float *f1, double *d1)
{
double tmp;
@@ -353,7 +353,7 @@ sse_cvtss2sd(float *f1, double *d1)
: "m" (*f1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsi2ss(int *i1, float *f1)
{
double tmp;
@@ -365,7 +365,7 @@ sse_cvtsi2ss(int *i1, float *f1)
: "m" (*i1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvttss2si(float *f1, int *i1)
{
int tmp;
@@ -377,7 +377,7 @@ sse_cvttss2si(float *f1, int *i1)
: "m" (*f1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtss2si(float *f1, int *i1)
{
int tmp;
@@ -390,7 +390,7 @@ sse_cvtss2si(float *f1, int *i1)
}
#if defined(__amd64)
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsi2ssq(long long *ll1, float *f1)
{
double tmp;
@@ -402,7 +402,7 @@ sse_cvtsi2ssq(long long *ll1, float *f1)
: "m" (*ll1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvttss2siq(float *f1, long long *ll1)
{
uint64_t tmp;
@@ -414,7 +414,7 @@ sse_cvttss2siq(float *f1, long long *ll1)
: "m" (*f1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtss2siq(float *f1, long long *ll1)
{
uint64_t tmp;
@@ -428,7 +428,7 @@ sse_cvtss2siq(float *f1, long long *ll1)
#endif
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpeqsd(double *d1, double *d2, long long *ll1)
{
__asm__ __volatile__(
@@ -438,7 +438,7 @@ sse_cmpeqsd(double *d1, double *d2, long long *ll1)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpltsd(double *d1, double *d2, long long *ll1)
{
__asm__ __volatile__(
@@ -448,7 +448,7 @@ sse_cmpltsd(double *d1, double *d2, long long *ll1)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmplesd(double *d1, double *d2, long long *ll1)
{
__asm__ __volatile__(
@@ -458,7 +458,7 @@ sse_cmplesd(double *d1, double *d2, long long *ll1)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cmpunordsd(double *d1, double *d2, long long *ll1)
{
__asm__ __volatile__(
@@ -469,7 +469,7 @@ sse_cmpunordsd(double *d1, double *d2, long long *ll1)
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_minsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -479,7 +479,7 @@ sse_minsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_maxsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -489,7 +489,7 @@ sse_maxsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_addsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -499,7 +499,7 @@ sse_addsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_subsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -509,7 +509,7 @@ sse_subsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_mulsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -519,7 +519,7 @@ sse_mulsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_divsd(double *d1, double *d2, double *d3)
{
__asm__ __volatile__(
@@ -529,7 +529,7 @@ sse_divsd(double *d1, double *d2, double *d3)
: "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_sqrtsd(double *d1, double *d2)
{
double tmp;
@@ -541,19 +541,19 @@ sse_sqrtsd(double *d1, double *d2)
: "m" (*d1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_ucomisd(double *d1, double *d2)
{
__asm__ __volatile__("ucomisd %1, %0" : : "x" (*d1), "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_comisd(double *d1, double *d2)
{
__asm__ __volatile__("comisd %1, %0" : : "x" (*d1), "x" (*d2));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsd2ss(double *d1, float *f1)
{
double tmp;
@@ -565,7 +565,7 @@ sse_cvtsd2ss(double *d1, float *f1)
: "m" (*d1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsi2sd(int *i1, double *d1)
{
double tmp;
@@ -576,7 +576,7 @@ sse_cvtsi2sd(int *i1, double *d1)
: "m" (*i1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvttsd2si(double *d1, int *i1)
{
int tmp;
@@ -588,7 +588,7 @@ sse_cvttsd2si(double *d1, int *i1)
: "m" (*d1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsd2si(double *d1, int *i1)
{
int tmp;
@@ -601,7 +601,7 @@ sse_cvtsd2si(double *d1, int *i1)
}
#if defined(__amd64)
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsi2sdq(long long *ll1, double *d1)
{
double tmp;
@@ -613,7 +613,7 @@ sse_cvtsi2sdq(long long *ll1, double *d1)
: "m" (*ll1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvttsd2siq(double *d1, long long *ll1)
{
uint64_t tmp;
@@ -625,7 +625,7 @@ sse_cvttsd2siq(double *d1, long long *ll1)
: "m" (*d1));
}
-extern __inline__ void
+extern __GNU_INLINE void
sse_cvtsd2siq(double *d1, long long *ll1)
{
uint64_t tmp;
@@ -639,37 +639,37 @@ sse_cvtsd2siq(double *d1, long long *ll1)
#endif
#elif defined(__sparc)
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_getfsr(unsigned long *l)
{
__asm__ __volatile__(
#if defined(__sparcv9)
- "stx %%fsr,%0\n\t"
+ "stx %%fsr,%0\n\t"
#else
- "st %%fsr,%0\n\t"
+ "st %%fsr,%0\n\t"
#endif
- : "=m" (*l));
+ : "=m" (*l));
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_setfsr(const unsigned long *l)
{
__asm__ __volatile__(
#if defined(__sparcv9)
- "ldx %0,%%fsr\n\t"
+ "ldx %0,%%fsr\n\t"
#else
- "ld %0,%%fsr\n\t"
+ "ld %0,%%fsr\n\t"
#endif
- : : "m" (*l) : "cc");
+ : : "m" (*l) : "cc");
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_getfsr32(unsigned int *l)
{
__asm__ __volatile__("st %%fsr,%0\n\t" : "=m" (*l));
}
-extern __inline__ void
+extern __GNU_INLINE void
__fenv_setfsr32(const unsigned int *l)
{
__asm__ __volatile__("ld %0,%%fsr\n\t" : : "m" (*l));
diff --git a/usr/src/lib/libm/i386/src/libm_inlines.h b/usr/src/lib/libm/i386/src/libm_inlines.h
index e57ecbaded..309d40460e 100644
--- a/usr/src/lib/libm/i386/src/libm_inlines.h
+++ b/usr/src/lib/libm/i386/src/libm_inlines.h
@@ -46,7 +46,7 @@ extern "C" {
#define _HI_WORD(x) ((uint32_t *)&x)[1]
#define _HIER_WORD(x) ((uint32_t *)&x)[2]
-extern __inline__ double
+extern __GNU_INLINE double
__inline_sqrt(double a)
{
double ret;
@@ -55,13 +55,13 @@ __inline_sqrt(double a)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
__ieee754_sqrt(double a)
{
return (__inline_sqrt(a));
}
-extern __inline__ float
+extern __GNU_INLINE float
__inline_sqrtf(float a)
{
float ret;
@@ -70,7 +70,7 @@ __inline_sqrtf(float a)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
__inline_rint(double a)
{
__asm__ __volatile__(
@@ -92,7 +92,7 @@ __inline_rint(double a)
* 10 - 53 bits
* 11 - 64 bits
*/
-extern __inline__ int
+extern __GNU_INLINE int
__swapRP(int i)
{
int ret;
@@ -114,7 +114,7 @@ __swapRP(int i)
* 10 - Round up
* 11 - Chop
*/
-extern __inline__ enum fp_direction_type
+extern __GNU_INLINE enum fp_direction_type
__swap87RD(enum fp_direction_type i)
{
int ret;
@@ -130,7 +130,7 @@ __swap87RD(enum fp_direction_type i)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
ceil(double d)
{
/*
@@ -157,7 +157,7 @@ ceil(double d)
return (d);
}
-extern __inline__ double
+extern __GNU_INLINE double
copysign(double d1, double d2)
{
__asm__ __volatile__(
@@ -171,28 +171,28 @@ copysign(double d1, double d2)
return (d1);
}
-extern __inline__ double
+extern __GNU_INLINE double
fabs(double d)
{
__asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc");
return (d);
}
-extern __inline__ float
+extern __GNU_INLINE float
fabsf(float d)
{
__asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc");
return (d);
}
-extern __inline__ long double
+extern __GNU_INLINE long double
fabsl(long double d)
{
__asm__ __volatile__("fabs\n\t" : "+t" (d) : : "cc");
return (d);
}
-extern __inline__ int
+extern __GNU_INLINE int
finite(double d)
{
int ret = _HI_WORD(d);
@@ -208,7 +208,7 @@ finite(double d)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
floor(double d)
{
short rd = __swap87RD(fp_negative);
@@ -223,29 +223,29 @@ floor(double d)
* branchless __isnan
* ((0x7ff00000-[((lx|-lx)>>31)&1]|ahx)>>31)&1 = 1 iff x is NaN
*/
-extern __inline__ int
+extern __GNU_INLINE int
isnan(double d)
{
int ret;
__asm__ __volatile__(
- "movl %1,%%ecx\n\t"
- "negl %%ecx\n\t" /* ecx <-- -lo_32(x) */
- "orl %%ecx,%1\n\t"
- "shrl $31,%1\n\t" /* 1 iff lx != 0 */
- "andl $0x7fffffff,%2\n\t" /* ecx <-- hi_32(abs(x)) */
- "orl %2,%1\n\t"
- "subl $0x7ff00000,%1\n\t"
- "negl %1\n\t"
- "shrl $31,%1\n\t"
- : "=r" (ret)
- : "0" (_HI_WORD(d)), "r" (_LO_WORD(d))
- : "ecx");
+ "movl %1,%%ecx\n\t"
+ "negl %%ecx\n\t" /* ecx <-- -lo_32(x) */
+ "orl %%ecx,%1\n\t"
+ "shrl $31,%1\n\t" /* 1 iff lx != 0 */
+ "andl $0x7fffffff,%2\n\t" /* ecx <-- hi_32(abs(x)) */
+ "orl %2,%1\n\t"
+ "subl $0x7ff00000,%1\n\t"
+ "negl %1\n\t"
+ "shrl $31,%1\n\t"
+ : "=r" (ret)
+ : "0" (_HI_WORD(d)), "r" (_LO_WORD(d))
+ : "ecx");
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
isnanf(float f)
{
__asm__ __volatile__(
@@ -260,12 +260,12 @@ isnanf(float f)
return (f);
}
-extern __inline__ double
+extern __GNU_INLINE double
rint(double a) {
return (__inline_rint(a));
}
-extern __inline__ double
+extern __GNU_INLINE double
scalbn(double d, int n)
{
double dummy;
@@ -281,38 +281,38 @@ scalbn(double d, int n)
return (d);
}
-extern __inline__ int
+extern __GNU_INLINE int
signbit(double d)
{
return (_HI_WORD(d) >> 31);
}
-extern __inline__ int
+extern __GNU_INLINE int
signbitf(float f)
{
return ((*(uint32_t *)&f) >> 31);
}
-extern __inline__ double
+extern __GNU_INLINE double
sqrt(double d)
{
return (__inline_sqrt(d));
}
-extern __inline__ float
+extern __GNU_INLINE float
sqrtf(float f)
{
return (__inline_sqrtf(f));
}
-extern __inline__ long double
+extern __GNU_INLINE long double
sqrtl(long double ld)
{
__asm__ __volatile__("fsqrt" : "+t" (ld) : : "cc");
return (ld);
}
-extern __inline__ int
+extern __GNU_INLINE int
isnanl(long double ld)
{
int ret = _HIER_WORD(ld);
diff --git a/usr/src/lib/libm/sparc/src/libm_inlines.h b/usr/src/lib/libm/sparc/src/libm_inlines.h
index 93c9aa2302..964bf3d88a 100644
--- a/usr/src/lib/libm/sparc/src/libm_inlines.h
+++ b/usr/src/lib/libm/sparc/src/libm_inlines.h
@@ -42,7 +42,7 @@
extern "C" {
#endif
-extern __inline__ double
+extern __GNU_INLINE double
__inline_sqrt(double d)
{
double ret;
@@ -51,7 +51,7 @@ __inline_sqrt(double d)
return (ret);
}
-extern __inline__ float
+extern __GNU_INLINE float
__inline_sqrtf(float f)
{
float ret;
@@ -60,7 +60,7 @@ __inline_sqrtf(float f)
return (ret);
}
-extern __inline__ enum fp_class_type
+extern __GNU_INLINE enum fp_class_type
fp_classf(float f)
{
enum fp_class_type ret;
@@ -113,7 +113,7 @@ fp_classf(float f)
#define _HI_WORD(x) ((uint32_t *)&x)[0]
#define _LO_WORD(x) ((uint32_t *)&x)[1]
-extern __inline__ enum fp_class_type
+extern __GNU_INLINE enum fp_class_type
fp_class(double d)
{
enum fp_class_type ret;
@@ -169,7 +169,7 @@ fp_class(double d)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
__swapEX(int i)
{
int ret;
@@ -201,13 +201,13 @@ __swapEX(int i)
* compatibility
*/
/* ARGSUSED */
-extern __inline__ enum fp_precision_type
+extern __GNU_INLINE enum fp_precision_type
__swapRP(enum fp_precision_type i)
{
return (0);
}
-extern __inline__ enum fp_direction_type
+extern __GNU_INLINE enum fp_direction_type
__swapRD(enum fp_direction_type d)
{
enum fp_direction_type ret;
@@ -235,7 +235,7 @@ __swapRD(enum fp_direction_type d)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
__swapTE(int i)
{
int ret;
@@ -262,19 +262,19 @@ __swapTE(int i)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
sqrt(double d)
{
return (__inline_sqrt(d));
}
-extern __inline__ float
+extern __GNU_INLINE float
sqrtf(float f)
{
return (__inline_sqrtf(f));
}
-extern __inline__ double
+extern __GNU_INLINE double
fabs(double d)
{
double ret;
@@ -283,7 +283,7 @@ fabs(double d)
return (ret);
}
-extern __inline__ float
+extern __GNU_INLINE float
fabsf(float f)
{
float ret;
diff --git a/usr/src/lib/libm/sparcv9/src/libm_inlines.h b/usr/src/lib/libm/sparcv9/src/libm_inlines.h
index 916cc6ba87..74dba0b301 100644
--- a/usr/src/lib/libm/sparcv9/src/libm_inlines.h
+++ b/usr/src/lib/libm/sparcv9/src/libm_inlines.h
@@ -42,7 +42,7 @@
extern "C" {
#endif
-extern __inline__ enum fp_class_type
+extern __GNU_INLINE enum fp_class_type
fp_classf(float f)
{
enum fp_class_type ret;
@@ -92,7 +92,7 @@ fp_classf(float f)
return (ret);
}
-extern __inline__ enum fp_class_type
+extern __GNU_INLINE enum fp_class_type
fp_class(double d)
{
enum fp_class_type ret;
@@ -144,7 +144,7 @@ fp_class(double d)
return (ret);
}
-extern __inline__ float
+extern __GNU_INLINE float
__inline_sqrtf(float f)
{
float ret;
@@ -153,7 +153,7 @@ __inline_sqrtf(float f)
return (ret);
}
-extern __inline__ double
+extern __GNU_INLINE double
__inline_sqrt(double d)
{
double ret;
@@ -162,7 +162,7 @@ __inline_sqrt(double d)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
__swapEX(int i)
{
int ret;
@@ -194,13 +194,13 @@ __swapEX(int i)
* compatibility
*/
/* ARGSUSED */
-extern __inline__ enum fp_precision_type
+extern __GNU_INLINE enum fp_precision_type
__swapRP(enum fp_precision_type i)
{
return (0);
}
-extern __inline__ enum fp_direction_type
+extern __GNU_INLINE enum fp_direction_type
__swapRD(enum fp_direction_type d)
{
enum fp_direction_type ret;
@@ -229,7 +229,7 @@ __swapRD(enum fp_direction_type d)
return (ret);
}
-extern __inline__ int
+extern __GNU_INLINE int
__swapTE(int i)
{
int ret;
@@ -259,19 +259,19 @@ __swapTE(int i)
}
-extern __inline__ double
+extern __GNU_INLINE double
sqrt(double d)
{
return (__inline_sqrt(d));
}
-extern __inline__ float
+extern __GNU_INLINE float
sqrtf(float f)
{
return (__inline_sqrtf(f));
}
-extern __inline__ double
+extern __GNU_INLINE double
fabs(double d)
{
double ret;
@@ -280,7 +280,7 @@ fabs(double d)
return (ret);
}
-extern __inline__ float
+extern __GNU_INLINE float
fabsf(float f)
{
float ret;
diff --git a/usr/src/lib/libsqlite/Makefile.com b/usr/src/lib/libsqlite/Makefile.com
index b2712a24d6..5b6dcc424e 100644
--- a/usr/src/lib/libsqlite/Makefile.com
+++ b/usr/src/lib/libsqlite/Makefile.com
@@ -245,7 +245,7 @@ parse.h parse.c : $(SRCDIR)/parse.y $(TOOLDIR)/lemon.c $(TOOLDIR)/lempar.c
-$(RM) parse_tmp.y lempar.c
$(CP) $(SRCDIR)/parse.y parse_tmp.y
$(CP) $(TOOLDIR)/lempar.c lempar.c
- $(NATIVECC) -o lemon $(TOOLDIR)/lemon.c
+ $(NATIVECC) $(NATIVE_CFLAGS) -o lemon $(TOOLDIR)/lemon.c
./lemon parse_tmp.y
-$(RM) parse.c parse.h
$(CP) parse_tmp.h parse.h
diff --git a/usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs b/usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs
index 9064aabbdb..b8dacd5b54 100644
--- a/usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs
+++ b/usr/src/test/zfs-tests/tests/functional/checksum/Makefile.subdirs
@@ -26,8 +26,8 @@ CMD64 = $(PROG:%=$(TESTDIR)/%.$(MACH64))
CMDS = $(CMD32) $(CMD64)
$(CMDS) := FILEMODE = 0555
-C99MODE = -xc99=%all
-CFLAGS = -I $(SRC)/uts/common -D_KERNEL
+C99MODE = $(C99_ENABLE)
+CFLAGS += -I $(SRC)/uts/common -D_KERNEL
LDLIBS += -lmd
LINTFLAGS += -u
LINTFLAGS64 += -u
diff --git a/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c b/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c
index af0e0b1cf3..d2f078be83 100644
--- a/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c
+++ b/usr/src/uts/common/io/audio/drv/audioemu10k/dsp/asm10k.c
@@ -437,7 +437,6 @@ compile_mono(char **tokens, int cnt)
{
char *parm, *def;
int n, num;
- char tmp[128];
CHECK_COUNT(tokens, cnt, 3, 3);
@@ -605,7 +604,6 @@ compile_directive(char **tokens, int cnt)
static void
compile_asm(char **tokens, int cnt)
{
- char *parms[4];
sym_t *symbols[4];
#define EMIT(o, r, a, x, y) \
fle.code[pc*2] = ((x) << 10) | (y); \
@@ -614,7 +612,7 @@ compile_asm(char **tokens, int cnt)
fle.code[pc*2] = ((x) << 12) | (y); \
fle.code[pc*2+1] = ((o) << 24) | ((r) << 12) | a; pc++
- int i, n = 0, nerr = 0;
+ int i, nerr = 0;
int ninputs = 0;
CHECK_COUNT(tokens, cnt, 5, 5);
@@ -813,7 +811,6 @@ init_compiler(void)
static void
produce_map(char *name)
{
- char fname[1024];
int i;
FILE *f;
@@ -957,8 +954,7 @@ done:
int
main(int argc, char *argv[])
{
- char line[4096], *p, *s, *outfile;
- char *iline;
+ char *outfile;
int i;
FILE *input;
char *tokens[10];
diff --git a/usr/src/uts/i86pc/Makefile.rules b/usr/src/uts/i86pc/Makefile.rules
index cc30fd647a..5d8c84a25e 100644
--- a/usr/src/uts/i86pc/Makefile.rules
+++ b/usr/src/uts/i86pc/Makefile.rules
@@ -219,7 +219,7 @@ DBOOT_MACH_32 = -D_BOOT_TARGET_i386
DBOOT_MACH_64 = -D_BOOT_TARGET_amd64
DBOOT_DEFS = -D_BOOT $(DBOOT_MACH_$(CLASS))
DBOOT_DEFS += -D_MACHDEP -D_KMEMUSER -U_KERNEL -D_I32LPx
-DBOOT_FLAGS = $(CCVERBOSE) $(CERRWARN) $(CCNOAUTOINLINE)
+DBOOT_FLAGS = $(CCVERBOSE) $(C99MODE) $(CERRWARN) $(CCNOAUTOINLINE)
DBOOT_CC_INCL = -I$(SRC)/common -I$(SRC)/common/util $(INCLUDE_PATH)
DBOOT_AS_INCL = $(AS_INC_PATH)
@@ -244,7 +244,7 @@ $(DBOOT_OBJS_DIR)/%.o: $(UTSBASE)/intel/ia32/%.s
$(DBOOT_AS) -P -D_ASM $(DBOOT_DEFS) $(DBOOT_AS_INCL) -o $@ $<
$(DBOOT_OBJS_DIR)/%.o: $(COMMONBASE)/crypto/sha1/%.c
- $(i386_CC) $(CERRWARN) -O $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
+ $(i386_CC) $(DBOOT_FLAGS) -O $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
$(DBOOT_OBJS_DIR)/%.o: $(COMMONBASE)/util/%.c
$(i386_CC) $(DBOOT_FLAGS) -O $(DBOOT_DEFS) $(DBOOT_CC_INCL) -c -o $@ $<
diff --git a/usr/src/uts/i86pc/genassym/Makefile b/usr/src/uts/i86pc/genassym/Makefile
index dc11bddde7..0f2ab219ef 100644
--- a/usr/src/uts/i86pc/genassym/Makefile
+++ b/usr/src/uts/i86pc/genassym/Makefile
@@ -83,8 +83,8 @@ CPPFLAGS += -I../../i86pc/io/ppm
# Create assym.h
#
$(GENASSYM): $(GENASSYM_SRC)
- $(NATIVECC) $(ALWAYS_DEFS) $(GENASSYM_DEFS) $(NATIVE_INC_PATH) \
- -o $@ $(GENASSYM_SRC)
+ $(NATIVECC) $(NATIVE_CFLAGS) $(ALWAYS_DEFS) $(GENASSYM_DEFS) \
+ $(NATIVE_INC_PATH) -o $@ $(GENASSYM_SRC)
$(ASSYM_H): $(OFFSETS_SRC) $(PLATFORM_OFFSETS_SRC) $(GENASSYM)
$(OFFSETS_CREATE) <$(OFFSETS_SRC) >$@
diff --git a/usr/src/uts/i86pc/ml/genassym.c b/usr/src/uts/i86pc/ml/genassym.c
index a34ca50669..168a55cc84 100644
--- a/usr/src/uts/i86pc/ml/genassym.c
+++ b/usr/src/uts/i86pc/ml/genassym.c
@@ -81,7 +81,7 @@ main(int argc, char *argv[])
printf("#define\tPIC_NSEOI 0x%x\n", PIC_NSEOI);
printf("#define\tPIC_SEOI_LVL7 0x%x\n", PIC_SEOI_LVL7);
- printf("#define\tNANOSEC 0x%x\n", NANOSEC);
+ printf("#define\tNANOSEC 0x%llx\n", NANOSEC);
printf("#define\tADJ_SHIFT 0x%x\n", ADJ_SHIFT);
printf("#define\tSSLEEP 0x%x\n", SSLEEP);
@@ -150,9 +150,9 @@ main(int argc, char *argv[])
printf("#define\tMAXSYSARGS 0x%x\n", MAXSYSARGS);
/* Hack value just to allow clock to be kicked */
- printf("#define\tNSEC_PER_CLOCK_TICK 0x%x\n", NANOSEC / 100);
+ printf("#define\tNSEC_PER_CLOCK_TICK 0x%llx\n", NANOSEC / 100);
- printf("#define\tNSEC_PER_COUNTER_TICK 0x%x\n", NANOSEC / PIT_HZ);
+ printf("#define\tNSEC_PER_COUNTER_TICK 0x%llx\n", NANOSEC / PIT_HZ);
printf("#define\tPITCTR0_PORT 0x%x\n", PITCTR0_PORT);
printf("#define\tPITCTL_PORT 0x%x\n", PITCTL_PORT);
diff --git a/usr/src/uts/i86xpv/Makefile.rules b/usr/src/uts/i86xpv/Makefile.rules
index 90a4323620..0dcc4d72d0 100644
--- a/usr/src/uts/i86xpv/Makefile.rules
+++ b/usr/src/uts/i86xpv/Makefile.rules
@@ -184,7 +184,8 @@ DBOOT_OBJS_DIR= dboot/$(OBJS_DIR)
DBOOT_XARCH_32 = $(i386_XARCH)
DBOOT_XARCH_64 = $(amd64_XARCH)
-DBOOT_CFLAGS = $(DBOOT_XARCH_$(CLASS)) $(CERRWARN) $(CCNOAUTOINLINE) -O
+DBOOT_CFLAGS = $(DBOOT_XARCH_$(CLASS)) $(C99MODE) $(CERRWARN) \
+ $(CCNOAUTOINLINE) -O
DBOOT_AS_XARCH_32 = $(i386_AS_XARCH)
DBOOT_AS_XARCH_64 = $(amd64_AS_XARCH)
diff --git a/usr/src/uts/i86xpv/genassym/Makefile b/usr/src/uts/i86xpv/genassym/Makefile
index 1da1f72164..a5b77cd9cf 100644
--- a/usr/src/uts/i86xpv/genassym/Makefile
+++ b/usr/src/uts/i86xpv/genassym/Makefile
@@ -23,7 +23,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
#
# This makefile drives the production of assym.h through
# compile time intialized data.
@@ -83,8 +82,8 @@ install: def
# Create assym.h
#
$(GENASSYM): $(GENASSYM_SRC)
- $(NATIVECC) $(ALWAYS_DEFS) $(GENASSYM_DEFS) $(NATIVE_INC_PATH) \
- -o $@ $(GENASSYM_SRC)
+ $(NATIVECC) $(NATIVE_CFLAGS) $(ALWAYS_DEFS) $(GENASSYM_DEFS) \
+ $(NATIVE_INC_PATH) -o $@ $(GENASSYM_SRC)
$(ASSYM_H): $(OFFSETS_SRC) $(PLATFORM_OFFSETS_SRC) $(GENASSYM)
$(OFFSETS_CREATE) <$(OFFSETS_SRC) >$@
diff --git a/usr/src/uts/intel/audioemu10k/Makefile b/usr/src/uts/intel/audioemu10k/Makefile
index e1d1e2e832..d0155c40fe 100644
--- a/usr/src/uts/intel/audioemu10k/Makefile
+++ b/usr/src/uts/intel/audioemu10k/Makefile
@@ -94,7 +94,7 @@ install: $(INSTALL_DEPS)
$(BINARY): $(OBJS_DIR)/asm10k $(DSP_HDRS)
$(ASM10K): $(DSP_SRCDIR)/asm10k.c
- $(CC) -o $@ $(DSP_SRCDIR)/asm10k.c
+ $(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(DSP_SRCDIR)/asm10k.c
$(DSP_HDRS): $(ASM10K) $(DSP_SRCS)
$(CPP) -D$(MODEL10K) -I$(DSP_SRCDIR) $(DSP_SRCDIR)/emu10k.dsp | \