Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

C Headers, part 3

C Headers, part 3

C Headers, part 3

Making progress.

Next error involves macros,
and reviewing Kernigen and Ritchie
4.11.2 Macro Substitution
A definition has the form
#define name replacement text
It calls for a macro substitution of the simplest kind-subsequent occurrences of
the token name will be replaced by the replacement text.

The actual error

CODE --> c

C:\gcc\bin\gcc.exe  -c cxdrinit.c
In file included from rpc/types.h:97:0,
                 from rpc/rpc.h:38,
                 from cxdrinit.c:2:
rpc/in.h:38:9: error: macro names must be identifiers
 #define <a name="_NETINET_IN_H_" <="" a=""><b>_NETINET_IN_H_</b>

Does it make sense to count both left and right brackets?


RE: C Headers, part 3

It looks like some HTML got mixed in there. Not sure if that is really in your code or if you copy/pasted from some sort of rich text? Either way, a macro can't start with a _ underscore or a < less than character. It needs to start with a letter.

RE: C Headers, part 3

That is a rather strange one. My rpc/rpc.h contains


#include <netinet/in.h> 
But then again, I am running the Linux version: not the Windows version.

RE: C Headers, part 3

Maybe that's my problem, I'm mixing windows and Linux.

I'm using Windows7, GCC 5.2, MinGW command-line and make.

Searching for information, I read somewhere that MinGW no longer includes some essential variable types, so this project has changed from a compile link and run to a minor rewrite.

Do you know of a "windows ready" xdr library?

RE: C Headers, part 3


Thank you, tried that.

Just to be clear, I'm using Windows7, GCC-5.2, and a MinGW msys-1.0 command window.

I call success being able to download the source, execute ./configure, make, and make install, with no errors.

I have attempted this with:

WinPortableXDR-4.9.1, and

The only package that works on my machine is sunrpc.

All the others go down a rabbit hole of macros and header errors.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now
The Great Project Profitability Debate
A/E firms have a great opportunity to lead the world into the future, but the industry’s greatest asset—real-time data—is sitting wasted in clunky, archaic ERP platforms. Learn how real-time, fully interactive dashboards in a modern ERP allow you to unlock data that will shape the future of the world. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close