Unix [SOLVED]: What is -D__USE_FIXED_PROTOTYPES__ in GCC used for?

Unix [SOLVED]: What is -D__USE_FIXED_PROTOTYPES__ in GCC used for?

Home Forums Unix Unix [SOLVED]: What is -D__USE_FIXED_PROTOTYPES__ in GCC used for?

Tagged: , , ,

Viewing 1 post (of 1 total)
  • Author
  • #37040



    In the book Practical C Programming, Chapter 7 Programming Process, there is a makefile:

    File: calc1/makefile.gcc
    #   Makefile for unix systems       #
    #    using a GNU C compiler         #
    # Compiler flags:
    #   -g  -- Enable debugging
    #   -Wall   -- Turn on all warnings (not used since it gives away
    #           the bug in this program)
    #       -- Force the compiler to use the correct headers
    #   -ansi   -- Don't use GNU extensions.  Stick to ANSI C.
    calc1: calc1.c
        $(CC) $(CFLAGS) -o calc1 calc1.c
        rm -f calc1 

    What are “correct headers”? Why there is no space between option parameters -D and __USE_FIXED_PROTOTYPES__?

    In the GCC mirror, there is:

    /* __USE_FIXED_PROTOTYPES__ used to be required to get prototypes for
       malloc, free, etc. on some platforms.  It is unclear if we still
       need it, but it can't hurt.  */
    #define __USE_FIXED_PROTOTYPES__

    There is explanation from Re: Is __USE_FIXED_PROTOTYPES__ really necessary?.

    But I do not get the points.

    This PRACC book was published in 1997, a bit old but still very useful. The Makefile is bit outdated, and I wonder whether the .gcc extension is needed anymore.

    Neither of these is mentioned in Errata for Practical C Programming.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.