Re: indent(1) support for gcc(1) 0b prefix

2008-04-28 Thread Frank Behrens
Romain Tartière [EMAIL PROTECTED] wrote on 26 Apr 2008 23:35:
...
 I was so wondering how useful(less) it was to support this extension in
 FreeBSD indent(1) program. The version of gcc provided with the base
 system does not support this syntax, and AFAIK, only the avr-gcc port
 support this kind of constructs...

It will be useful.
The new gcc 4.3 release supports this extension without addtional patches. I 
cite the 
changelog:
Integer constants written in binary are now supported as a GCC extension. They 
consist of a 
prefix 0b or 0B, followed by a sequence of 0 and 1 digits.
-- 
Frank Behrens, Osterwieck, Germany
PGP-key 0x5B7C47ED on public servers available.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: indent(1) support for gcc(1) 0b prefix

2008-04-28 Thread Lukasz Jaroszewski
On Apr 26, 2008, at 5:01 PM, Max Laier wrote:

* On Saturday 26 April 2008 23:35:57 Romain Tartière wrote:
** Hello FreeBSD hackers!
**
** I'm using avr-gcc from the ports and relying on the 0b prefix
** notation
** for binary constants, that is:
**
**   foo = 0b00101010;
**
** Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is
** possible :-)
**
** But I would like to use indent(1) to reformat contributed code
** automatically. Unfortunately, the 0b notation is not supported by
** that
** program, and the resulting code looks like this:
**
**   foo = 0 b00101010;
**
** ... then compilation fails, bla bla bla...
**
** I can't think of a case (outside of 0x context) where ...0b...
** would be valid C code, let alone better formated as ...0 b
** Hence I
** see no harm in adding your patch to the base indent(1).
**
** Does anyone have an example where ...0 b... is valid C code?
*
Well, if b... is a preprocessor define then you can easily
come up with valid C:

#define b...   *2

then:  ...0 b...
becomes:   ...0 *2

That's a valid expression in the right context...

FYI,

--
Marcel Moolenaar
xcllnt at mac.com http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

From c-faq.com( by Bill Finke ):

#define Ob(x)  ((unsigned)Ob_(0 ## x ## uL))
#define Ob_(x) (x  1 | x  2  2 | x  4  4 | x  6  8 |  \
x  8  16 | x  10  32 | x  12  64 | x  14  128)
---
#define PORT_SYSCTLA  0x092 /* PS2 system control port A */
#define SYSCTLA_DSK   Ob(1000)  /* lights the fixed dsk activity led */
#define SYSCTLA_DSK0  Ob(0100)  /* also lights fixed disk actvty led */
#define SYSCTLA_TMOT  Ob(0001)  /* watchdog timer has timed-out  */
#define SYSCTLA_LOCK  Ob(1000)  /* CMOS password area is locked  */
#define SYSCTLA_A20   Ob(0010)  /* alternate address line 20 gating  */
#define SYSCTLA_RST   Ob(0001)  /* alternate hot reset   */

regards
LJ776-RIPE
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: information buffer of NIC

2008-04-28 Thread Israel Lehnen Silva
it print info of ethernet device?
in one example:
http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/nestat_m.htm
show CPU 0 and CPU 1



On Tue, Apr 29, 2008 at 12:22 AM, Victor Hugo Bilouro [EMAIL PROTECTED] wrote:

 On Mon, Apr 28, 2008 at 12:10 AM, Israel Lehnen Silva
  [EMAIL PROTECTED] wrote:
   Hello!
  
I need information of load of buffer NICs
Yours have one suggestion?
  
Muito obrigado.
  
--
  
Att. Israel Lehnen Silva
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]
  

  netstat -m

  http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/netstat/

  --
  Victor Hugo Bilouro
  FreeBSD!
  21 7832 5699 Celular
  8 * 72 757 Rádio




-- 

Att. Israel Lehnen Silva
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using special CFLAGS for a single file without writing the rule

2008-04-28 Thread Ruslan Ermilov
On Thu, Apr 24, 2008 at 06:04:15PM +0200, Jeremie Le Hen wrote:
 Hi Ruslan, hi all,
 
 I don't know if you followed the thread on -arch@, but the outcome is
 basically that SSP should be disabled for a couple of files:
 lib/csu/*
 gnu/lib/csu/* (reported by antoine@, but I couldn't verify this one)
 lib/libc/sys/stack_protector.c
 sys/kern/stack_protector.c
 
 Antoine Brodin supplied a patch for the kernel part:
 +kern/stack_protector.c standard\
 +   compile-with${NORMAL_C:N-fstack-protector*}
 
 As for lib/csu/*, this is straightforward, I just have to set
 WITHOUT_SSP in the Makefile.
 
 The hardest one is lib/libc/sys/stack_protector.c.  I endeavored to find
 a way to compile a single file with ${CFLAGS:N-fstack-protector*}, but I
 found no recipe but writing the whole rule for this file.  I would
 really like to avoid this solution so as to not override bsd.lib.mk
 settings.
 
 Considering your big experience with the build infrastructure, I suspect
 you would have a solution.
 
Either by using a special rule, or through a hack similar to
the one found in the last two lines of libc/Makefile.


Cheers,
-- 
Ruslan Ermilov
[EMAIL PROTECTED]
FreeBSD committer
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]