Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:45:42+00:00 2026-05-26T22:45:42+00:00

I am trying to port some relatively modern C code to an older compiler.

  • 0

I am trying to port some relatively modern C code to an older compiler.

This compiler (DICE), it seems, chokes on the first header file and the first occurrence of this idiom:

#ifndef SOMETHING
#define SOMETHING

...  

#endif /* SOMETHING */

it dies on the second line in the header with:
DCPP: "../../code/someheader.h" L:2 C:0 Error:39 Syntax Error

Changing to #define SOMETHING 1 made no difference.

So I have really two questions, am I using DICE with the wrong option or something, or did C programmers use some other idiom equal to ifndef-define back in the old days?

References:

  • DICE Wikipedia Entry
  • Original source code, runs on Unix
  • Slightly updated Amiga version
  • The author of DICE, Matt Dillon, went on to produce DragonFlyBSD
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:45:43+00:00Added an answer on May 26, 2026 at 10:45 pm

    If it is this C compiler then by looking at the sources (src\dcpp\cpp.c) you can see that newlines only include the carriage return character and not the linefeed character.

    If you have a line ending with CRLF then when the compiler strips the whitespace at the start of the line, it does not strip the linefeed before the # which is a syntax error, since preprocessor directives starting with # must be the first non-whitespace character in the line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to port some code to 64-bit, but it seems that the thread
I'm trying to port some Windows code to Linux, ideally through platform-independent libraries (eg
I'm trying to port some of my c++ code into c. I have the
I'm trying to port some OpenGL rendering code I wrote for iOS to a
I am trying to port some code from a regular Java program into the
I am trying to port some Python code to .NET, and I was wondering
I'm trying to port a Windows app to Linux. This appplication marks some functions
Currently I am trying to port some VB.NET code to C#. The struct looks
I'm trying to port some code into .net which has a load of #define'd
I'm trying to port some old MSVC C++ code to MinGW/GCC. One problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.