LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-28-2011, 12:12 PM   #1
minivy
LQ Newbie
 
Registered: Nov 2011
Posts: 15

Rep: Reputation: Disabled
What Does __bitwise Mean


To Linux fans,

When I compliled my code, the line, listed below, in the header file types.h has an compilation error. If you know what causes the error, please help.

Thanks in advance.

Link to the header file types.h
http://tomoyo.sourceforge.jp/cgi-bin.../linux/types.h

The line of code that has error:
typedef __u32 __bitwise __be32;

Error Message:
Multiple markers at this line
- error (dcc:1082): illegal storage class
- error (dcc:1633): parse error near '__le32'
- error (dcc:1117): identifier __u32 not an
argument

Question1: What does the keyword "__bitwise" mean?

Question2: Where is __u32 defined?

Question3: How can I covert this code to WindRiver VxWork Kernel code?
 
Old 11-28-2011, 09:22 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The __bitwise typedef is a compilation attribute that is not used by gcc. Its purpose was to prevent issues with bit order, by preventing conversions between types with different endian types. You can leave it as defined in types.h, it will not affect your code.

The fixed width words such as __u32 are defined in asm/types.h (which includes for example asm-generic/int-l64.h). You may need to define these for your particular CPU.

The WindRiver code will already have its own type definitions, which would be preferable to the Linux ones if you are running or porting to a WindRiver system.

Last edited by neonsignal; 11-28-2011 at 09:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration