Custom Query (541 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 541)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#140 fixed Replace #include <linux/ioctl.h> with #include <sys/ioctl.h> kevin baker
Description

gcc version 4.2.1 (Mac OS X 10.5.8) has errors when compiling data_sources/srpar2ew and src/data_sources/srusb2ew, such as:

error: linux/ioctl.h: No such file or directory

This is because on Mac OS X the compiler command lines cause Linux code to be used, which #include's <linux/ioctl.h>. The fix is to replace #include <linux/ioctl.h> with #include <sys/ioctl.h> in three files:

src/data_sources/srpar2ew/pargps/include/pargpskd.h
src/data_sources/srpar2ew/parxch/include/parxchkd.h
src/data_sources/srusb2ew/USBXCH/Include/SrUsbXchDrv.h

On a Linux system, /usr/include/linux/ioctl.h simply #include's <asm/ioctl.h>, which is also included by /usr/include/sys/ioctl.h. I compared the preprocessed output of src/data_sources/srpar2ew/parxch/lib/parxch.c as a test, and the preprocessed source files were identical, except for the name of the included ioctl.h file.

#141 fixed Replace #include <malloc.h> with #include <stdlib.h> kevin baker
Description

gcc version 4.2.1 (Mac OS X 10.5.8) has an error compiling data_sources/srusb2ew/USBXCH/Lib/SrUsbXch.c:

error: malloc.h: No such file or directory

This is because data_sources/srusb2ew/USBXCH/Lib/SrUsbXch.c #include's <malloc.h> to define malloc() and free():

#include <malloc.h>      // for malloc + free

ANSI/ISO C 1989-1990 specifies that malloc() and free() are in in stdlib.h. The fix is to replace #include <malloc.h> with #include <stdlib.h> in data_sources/srusb2ew/USBXCH/Lib/SrUsbXch.c:

#include <string.h>      // for memset
#include <stdlib.h>      // for malloc + free
#include <sys/stat.h>    // fstat function (VC++ can use / in path)
#142 fixed Replace #include <malloc.h> with #include <stdlib.h> somebody baker
Description

There are numerous instances of #include <malloc.h> in the Earthworm source code. In some cases, the #include <malloc.h> is commented out for Mac OS X because it does not exist on a Mac. For example, in seismic_processing/raypicker/raypicker.c:

#ifndef _MACOSX
#include <malloc.h>
#endif

Furthermore, seismic_processing/raypicker/raypicker.c already #include's <stdlib.h>, which makes the #include <malloc.h> superfluous.

The ANSI/ISO C 1898-1990 standard, section 7.10.3, Memory management functions, specifies the following functions in stdlib.h: malloc(), calloc(), realloc() and free(); malloc.h is not a part of the standard. malloc.h is an obsolete, non-standard system header file and should be replaced with stdlib.h.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.