public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* AW: [ECOS] __attribute__ ((packed)) doesn't work
@ 2006-02-22 12:42 Siegmund, Thomas
  2006-02-22 14:49 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Siegmund, Thomas @ 2006-02-22 12:42 UTC (permalink / raw)
  To: ecos-discuss

Sorry for that but I don't have an influence to discard this attachment. 
I only can apologize myself but I really would appreciate to get 
a technical hint. 

Thomas



-----Ursprüngliche Nachricht-----
Von: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] Im Auftrag von Andrew Lunn
Gesendet: Mittwoch, 22. Februar 2006 13:05
An: Peter Seebach
Cc: ecos-discuss@ecos.sourceware.org
Betreff: Re: [ECOS] __attribute__ ((packed)) doesn't work

On Wed, Feb 22, 2006 at 05:29:06AM -0600, Peter Seebach wrote:
> In message <43FC4A07.3070704@zurich.ibm.com>, Dirk Husemann writes:
> >could you leave this part of the signature out? sending something to 
> >a public mailing list cannot be considered confidential and some 
> >companies have rather strict rules about receiving unsolicited 
> >confidential material...
> 
> The problem here is conflicting legal standards.  There are sound 
> legal reasons to absolutely require that ALL outgoing mail have that 
> disclaimer in some countries.  I know, it sounds dumb.  "The law is an ass."
> Both companies are making rational decisions given the variety of 
> atrociously stupid laws and court decisions on such issues.

Yes, this is stupid. It is a shame i have to delete the email, since i probablyu know what is wrong....

        Andrew


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

Ce message (ainsi que les eventuelles pieces jointes) est
exclusivement adresse au destinataire et contient des
informations confidentielles. La copie, la communication ou la
distribution du contenu de ce message sans l'accord prealable de
l'expediteur sont strictement interdits et peuvent constituer un
delit. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur. Si vous avez des questions se
rapportant a ce courrier electronique, merci de bien vouloir
notifier
l'expediteur immediatement.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 12:42 AW: [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
@ 2006-02-22 14:49 ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2006-02-22 14:49 UTC (permalink / raw)
  To: Siegmund, Thomas; +Cc: ecos-discuss

On Wed, Feb 22, 2006 at 01:42:26PM +0100, Siegmund, Thomas wrote:
> Sorry for that but I don't have an influence to discard this attachment. 
> I only can apologize myself but I really would appreciate to get 
> a technical hint. 

OK, so long as you agree not to take me to court!

The USB stack was tested on ARM with gcc 3.2.1. GCC is getting more
picky about where the attributes are placed. I think that the version
you are using is simply ignoring them. You change is correct. If you
submit a proper patch i will see about comitting it.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* AW: [ECOS] __attribute__ ((packed)) doesn't work
@ 2006-02-23 15:27 Siegmund, Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Siegmund, Thomas @ 2006-02-23 15:27 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]

Hello,

the "usb.h" was edited and the "usb.diff" was created. I hope it's correct.

Thomas


-----Ursprüngliche Nachricht-----
Von: Andrew Lunn [mailto:andrew@lunn.ch] 
Gesendet: Mittwoch, 22. Februar 2006 16:37
An: Siegmund, Thomas
Cc: ecos-discuss@ecos.sourceware.org
Betreff: Re: [ECOS] __attribute__ ((packed)) doesn't work

On Wed, Feb 22, 2006 at 04:04:56PM +0100, Siegmund, Thomas wrote:
> Thanks for your answer about the court ;-))...
> Hopefully this attachment won't appear now.
> 

> Well, and what about the "usb_endpoint_descriptor" which doesn't own 
> this attribute?  My assumption is it is missing, isn't it?

It is probably missing it, but Bart should decide.

> Concerning a patch I'm not familiar to create this one because I'm a 
> newbie. Can you tell me where some documentation about it are placed?

You are using the old code 2.0 i think? 

You should really update to anoncvs, the latest source code.

http://ecos.sourceware.org/anoncvs.html

Edit the file to how you think it should be. Add an entry to the ChangeLog file in the package. Just follow the format of the other entries. Test the code works.

Then do

cvs diff -u packages/io/usb > usb.diff

and send us the file usb.diff

        Andrew


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

Ce message (ainsi que les eventuelles pieces jointes) est
exclusivement adresse au destinataire et contient des
informations confidentielles. La copie, la communication ou la
distribution du contenu de ce message sans l'accord prealable de
l'expediteur sont strictement interdits et peuvent constituer un
delit. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur. Si vous avez des questions se
rapportant a ce courrier electronique, merci de bien vouloir
notifier
l'expediteur immediatement.

[-- Attachment #2: usb.diff --]
[-- Type: application/octet-stream, Size: 3105 bytes --]

? packages/io/usb/common/current/include/usb.diff
Index: packages/io/usb/common/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/common/current/ChangeLog,v
retrieving revision 1.3
diff -u -r1.3 ChangeLog
--- packages/io/usb/common/current/ChangeLog	23 May 2002 23:06:30 -0000	1.3
+++ packages/io/usb/common/current/ChangeLog	23 Feb 2006 11:25:55 -0000
@@ -11,6 +11,11 @@
 
 	* First check-in of eCos USB support.
 
+2006-02-23 Thomas Siegmund  <thomas.siegmund@hach-lange.de>
+
+	* include/usb.h:
+	 changed position __attribute__((packed)) cos of issue gcc 3.3.3
+
 //===========================================================================
 //####ECOSGPLCOPYRIGHTBEGIN####
 // -------------------------------------------
Index: packages/io/usb/common/current/include/usb.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/common/current/include/usb.h,v
retrieving revision 1.3
diff -u -r1.3 usb.h
--- packages/io/usb/common/current/include/usb.h	23 May 2002 23:06:31 -0000	1.3
+++ packages/io/usb/common/current/include/usb.h	23 Feb 2006 10:33:14 -0000
@@ -69,7 +69,7 @@
     unsigned char       index_hi;
     unsigned char       length_lo;
     unsigned char       length_hi;
-} usb_devreq __attribute__((packed));
+} __attribute__((packed)) usb_devreq; 
 
 // Encoding of the request_type    
 #define USB_DEVREQ_DIRECTION_OUT        0
@@ -145,7 +145,7 @@
     unsigned char       product_str;
     unsigned char       serial_number_str;
     unsigned char       number_configurations;
-} usb_device_descriptor __attribute__((packed));
+} __attribute__((packed)) usb_device_descriptor;
 
 #define USB_DEVICE_DESCRIPTOR_LENGTH             18
 #define USB_DEVICE_DESCRIPTOR_TYPE               USB_DEVREQ_DESCRIPTOR_TYPE_DEVICE
@@ -169,7 +169,7 @@
     unsigned char       configuration_str;
     unsigned char       attributes;
     unsigned char       max_power;
-} usb_configuration_descriptor __attribute__((packed));
+} __attribute__((packed)) usb_configuration_descriptor;
 
 #define USB_CONFIGURATION_DESCRIPTOR_LENGTH     9
 #define USB_CONFIGURATION_DESCRIPTOR_TYPE       USB_DEVREQ_DESCRIPTOR_TYPE_CONFIGURATION
@@ -187,7 +187,7 @@
     unsigned char       interface_subclass;
     unsigned char       interface_protocol;
     unsigned char       interface_str;
-} usb_interface_descriptor __attribute__((packed));        
+} __attribute__((packed)) usb_interface_descriptor;        
 
 #define USB_INTERFACE_DESCRIPTOR_LENGTH          9
 #define USB_INTERFACE_DESCRIPTOR_TYPE            USB_DEVREQ_DESCRIPTOR_TYPE_INTERFACE
@@ -203,7 +203,7 @@
     unsigned char       max_packet_lo;
     unsigned char       max_packet_hi;
     unsigned char       interval;
-} usb_endpoint_descriptor;
+} __attribute__((packed)) usb_endpoint_descriptor;
 
 #define USB_ENDPOINT_DESCRIPTOR_LENGTH           7
 #define USB_ENDPOINT_DESCRIPTOR_TYPE             USB_DEVREQ_DESCRIPTOR_TYPE_ENDPOINT

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* AW: [ECOS] __attribute__ ((packed)) doesn't work
@ 2006-02-22 15:05 Siegmund, Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Siegmund, Thomas @ 2006-02-22 15:05 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Thanks for your answer about the court ;-))...
Hopefully this attachment won't appear now.

Well, and what about the "usb_endpoint_descriptor" which doesn't own this attribute? 
My assumption is it is missing, isn't it? 
Concerning a patch I'm not familiar to create this one because I'm a newbie. Can
you tell me where some documentation about it are placed?

Thomas

 

-----Ursprüngliche Nachricht-----
Von: Andrew Lunn [mailto:andrew@lunn.ch] 
Gesendet: Mittwoch, 22. Februar 2006 15:49
An: Siegmund, Thomas
Cc: ecos-discuss@ecos.sourceware.org
Betreff: Re: [ECOS] __attribute__ ((packed)) doesn't work

On Wed, Feb 22, 2006 at 01:42:26PM +0100, Siegmund, Thomas wrote:
> Sorry for that but I don't have an influence to discard this attachment. 
> I only can apologize myself but I really would appreciate to get a 
> technical hint.

OK, so long as you agree not to take me to court!

The USB stack was tested on ARM with gcc 3.2.1. GCC is getting more picky about where the attributes are placed. I think that the version you are using is simply ignoring them. You change is correct. If you submit a proper patch i will see about comitting it.

        Andrew

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

Ce message (ainsi que les eventuelles pieces jointes) est
exclusivement adresse au destinataire et contient des
informations confidentielles. La copie, la communication ou la
distribution du contenu de ce message sans l'accord prealable de
l'expediteur sont strictement interdits et peuvent constituer un
delit. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur. Si vous avez des questions se
rapportant a ce courrier electronique, merci de bien vouloir
notifier
l'expediteur immediatement.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-23 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 12:42 AW: [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
2006-02-22 14:49 ` Andrew Lunn
2006-02-22 15:05 AW: " Siegmund, Thomas
2006-02-23 15:27 Siegmund, Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).