Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malloc.h not found on Mac OS Leopard #3

Open
GoogleCodeExporter opened this issue Dec 8, 2015 · 10 comments
Open

malloc.h not found on Mac OS Leopard #3

GoogleCodeExporter opened this issue Dec 8, 2015 · 10 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile cmockery on Mac OS Leopard

What is the expected output? What do you see instead?
When running "./configure && make", it errors out saying that "malloc.h" can 
not be found (log 
attached as "plain-configure.log"). On Mac OS there are at least 3 different 
"malloc.h" files:

$ find /usr/include -name "malloc.h"
/usr/include/malloc/malloc.h
/usr/include/objc/malloc.h
/usr/include/sys/malloc.h

 Apparently "/usr/include/sys/malloc.h" is the one to use. Thus I attempted to compile cmockery 
by issueing the following command:

"CFLAGS="-I/usr/include/sys" ./configure && make

That got me further, but size_t does not appear to be defined.
According to stdlib.h, size_t is defined as:
typedef __darwin_size_t size_t;

Output of the build process is attached as "cflags-configure.log".

What version of the product are you using? On what operating system?
cmockery 0.1.2, Mac OS Leopard (10.5.4)


Original issue reported on code.google.com by [email protected] on 14 Oct 2008 at 1:00

Attachments:

@GoogleCodeExporter
Copy link
Author

I just found someone's post on the group about the same problem[0]. It turns 
out /usr/include/malloc/malloc.h 
is the proper malloc.h. Compiling cmockery using that header works fine.

[0] 
http://groups.google.com/group/cmockery/browse_thread/thread/046ac9d8189760a4

Original comment by [email protected] on 14 Oct 2008 at 3:31

@GoogleCodeExporter
Copy link
Author

There's a better way which I have a patch for and am going to submit it for 
code review.

Original comment by [email protected] on 28 Jan 2009 at 5:22

@GoogleCodeExporter
Copy link
Author

stevej your patch would be appreciated, where is it?

Original comment by [email protected] on 10 Apr 2009 at 6:59

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 10 Apr 2009 at 9:43

@GoogleCodeExporter
Copy link
Author

I don't have a configuration to reproduce this.  If someone sends me a patch 
I'll 
integrate the fix.

Original comment by [email protected] on 10 Apr 2009 at 9:45

@GoogleCodeExporter
Copy link
Author

Since you're using configure which is testing for malloc.h, I've attached a 
patch that gets 
this to build on Mac OS X 10.5.7 (Xcode 3.1.2) with HAVE_MALLOC_H.  Note that I 
also 
added an include for sys/types.h to get size_t in src/example/allocate_module.c.

Original comment by [email protected] on 31 May 2009 at 9:35

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 6 Jul 2009 at 7:34

@GoogleCodeExporter
Copy link
Author

This will be integrated into cmockery release 0.1.3.

Original comment by [email protected] on 7 Jul 2009 at 7:43

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 7 Jul 2009 at 7:51

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Any word on 0.1.3?

Original comment by [email protected] on 11 Mar 2012 at 3:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant