<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how can i use the #pragma pack() in following example in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/6314367#M58730</link>
    <description>&lt;P&gt;Over&amp;nbsp;10 years later, I ran into the same problem and found this post, which was unhelpful. Later I found the problem myself, it consists of two parts:&lt;BR /&gt;1. gcc doesn't support #pragma pack up to version 2.96&lt;BR /&gt;2. gcc 2.96 and up supports #pragma pack, but at least the version I'm using (WindRiver's ccppc 2.96) supports it only if the line endings are Unix style (LF only).&lt;BR /&gt;Hope I'll be helpful for someone in the future.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2013 12:24:40 GMT</pubDate>
    <dc:creator>jonyav</dc:creator>
    <dc:date>2013-12-25T12:24:40Z</dc:date>
    <item>
      <title>how can i use the #pragma pack() in following example</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939004#M58727</link>
      <description>hi,&lt;BR /&gt;  thanks for the information.&lt;BR /&gt; because of U i have got a new point.but till now also my problem was didn't solved.&lt;BR /&gt; i am using the #pragma pack()&lt;BR /&gt;in my example like following&lt;BR /&gt;  #include&lt;STDIO.H&gt;&lt;BR /&gt;  #pragma pack(push,&amp;lt;4&amp;gt;)&lt;BR /&gt;  typedef struct messageheader&lt;BR /&gt;    {&lt;BR /&gt;        char x[2];&lt;BR /&gt;        long logtime;&lt;BR /&gt;        char alphachar[2];&lt;BR /&gt;        short transactioncode;&lt;BR /&gt;        short errorcode;&lt;BR /&gt;    }msg;&lt;BR /&gt;  #pragma pack(push)&lt;BR /&gt;  &lt;BR /&gt;  #pragma pack(push,&amp;lt;4&amp;gt;)&lt;BR /&gt;  typedef struct logonrequest&lt;BR /&gt;    {&lt;BR /&gt;       msg h;&lt;BR /&gt;       short userid;&lt;BR /&gt;       char pwd[8];&lt;BR /&gt;       char newpwd[8];&lt;BR /&gt;       char reserved[30];&lt;BR /&gt;    }logon;&lt;BR /&gt;  #pragma pack(push)&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; while running this program i am getting warnings like this:&lt;BR /&gt;&lt;BR /&gt; malformed '#pragma pack(push[,id],&lt;N&gt;)'&lt;BR /&gt;  so,please make a solution for this and send it to me.&lt;/N&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 31 Mar 2003 06:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939004#M58727</guid>
      <dc:creator>satish_16</dc:creator>
      <dc:date>2003-03-31T06:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: how can i use the #pragma pack() in following example</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939005#M58728</link>
      <description>Assuming that you are using gcc/g++ then you do it like this:&lt;BR /&gt;&lt;BR /&gt;struct foo {&lt;BR /&gt;int bar;&lt;BR /&gt;int baz;&lt;BR /&gt;} __attributes__ ((&lt;SOMEATTR&gt;));&lt;BR /&gt;&lt;BR /&gt;gcc does not recognize #pragma push and #pragma pop, those two pragmas are msvc++ #pragmas, if I am not mistaken.&lt;/SOMEATTR&gt;</description>
      <pubDate>Tue, 01 Apr 2003 07:52:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939005#M58728</guid>
      <dc:creator>Michael Brailsford</dc:creator>
      <dc:date>2003-04-01T07:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: how can i use the #pragma pack() in following example</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939006#M58729</link>
      <description>I mentioned this before here :&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb230b941255cd71190080090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb230b941255cd71190080090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But they're obviously ignoring it.&lt;BR /&gt;&lt;BR /&gt;G.</description>
      <pubDate>Tue, 01 Apr 2003 09:42:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/2939006#M58729</guid>
      <dc:creator>Goran Koruga</dc:creator>
      <dc:date>2003-04-01T09:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: how can i use the #pragma pack() in following example</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/6314367#M58730</link>
      <description>&lt;P&gt;Over&amp;nbsp;10 years later, I ran into the same problem and found this post, which was unhelpful. Later I found the problem myself, it consists of two parts:&lt;BR /&gt;1. gcc doesn't support #pragma pack up to version 2.96&lt;BR /&gt;2. gcc 2.96 and up supports #pragma pack, but at least the version I'm using (WindRiver's ccppc 2.96) supports it only if the line endings are Unix style (LF only).&lt;BR /&gt;Hope I'll be helpful for someone in the future.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2013 12:24:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-can-i-use-the-pragma-pack-in-following-example/m-p/6314367#M58730</guid>
      <dc:creator>jonyav</dc:creator>
      <dc:date>2013-12-25T12:24:40Z</dc:date>
    </item>
  </channel>
</rss>

