public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Siegmund, Thomas" <thomas.siegmund@hach-lange.de>
To: <ecos-discuss@ecos.sourceware.org>
Subject: AW: [ECOS] __attribute__ ((packed)) doesn't work
Date: Thu, 23 Feb 2006 15:27:00 -0000	[thread overview]
Message-ID: <211AD5A0EF29B84B9B2736BAF71657B775A3CD@dhreinsvxb02.messaging.danaherad.com> (raw)

[-- 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

             reply	other threads:[~2006-02-23 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23 15:27 Siegmund, Thomas [this message]
2006-03-02 18:41 ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2006-02-22 15:05 AW: " Siegmund, Thomas
2006-02-22 12:42 Siegmund, Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211AD5A0EF29B84B9B2736BAF71657B775A3CD@dhreinsvxb02.messaging.danaherad.com \
    --to=thomas.siegmund@hach-lange.de \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).