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 8387327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:10:48+00:00 2026-06-09T18:10:48+00:00

I started to look into glibc ( GNU Libc ) to understand how it’s

  • 0

I started to look into glibc (GNU Libc)
to understand how it’s written. In malloc.c, I found a piece of code as follow:

#ifndef void
#define void        void
#endif

Can someone please explain to me what this means? Isn’t void always defined?

Thanks

  • 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-06-09T18:10:50+00:00Added an answer on June 9, 2026 at 6:10 pm

    Looking at the git history, it was like this:

    /*
      Void_t* is the pointer type that malloc should say it returns
    */
    
    #ifndef Void_t
    #if (__STD_C || defined(WIN32))
    #define Void_t      void
    #else
    #define Void_t      char
    #endif
    #endif /*Void_t*/
    

    This was a workaround for historical [C], which did not have void and malloc() returned char * instead of void. The code was removed by Ulrich Drepper in 2011. The commit does not seems to be generated by a script or anything automatic, so he must had his intension to define like that.

    The commit message does not say anything about void:

    Simplify malloc code

    Remove all kinds of unused configuration options and dead code.

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

Sidebar

Related Questions

I have started to look into python and am trying to grasp new things
When I started to look for the benefits of polymorphism, I found with this
I started to look into using GWT in combination with UiBuilder. I'm a bit
I have started to look into if it is possible to use facebook connect
I've recently started using Ruby and was told to look into using RVM. I'm
I've started to look into the whole unit testing/test-driven development idea, and the more
I recently started to look into asp.net mvc. Here is my issue. Say every
When I first started looking at Scala, I liked the look of for-comprehensions. They
Started learning algorithms. I understand how to find theta-notation from a 'regular recurrence' like
Started making a game. Here's some of my code. package games.tribe.screens; import games.tribe.model.World; import

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.