Issue #970 - ensure that g2int has the same definition throughout grib2 and all dependencies; updated variable types based on function signatures.
Change-Id: If25d724c18ff5a9d09f94d77304ec729866158e6 Former-commit-id:dd451f392f
[formerly6126e4316a
] [formerly485334331a
] [formerlyd07281ac51
[formerly485334331a
[formerly 4dc6be0e1bf32b126a0685109131e1b4b3f5acd1]]] Former-commit-id:d07281ac51
Former-commit-id: f8fef4627ebba88a297740ab1ae189fd855e752d [formerly024a23e7a3
] Former-commit-id:5b7330ca01
This commit is contained in:
parent
7b302e984f
commit
17a9da0402
8 changed files with 28 additions and 16 deletions
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>nativeLib</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,12 +1,27 @@
|
|||
ARCHFLAGS =
|
||||
# This script will currently only influence how various cdt
|
||||
# project dependencies are built rather than the cdt builds
|
||||
# themselves.
|
||||
|
||||
# leave blank to let the OS determine the architecture or
|
||||
# set to one of: {-m32, -m64} to specify the architecture.
|
||||
# setting the flag to anything other than -m32 or -m64 will
|
||||
# cause unknown, potentially chaotic, build results.
|
||||
ARCHFLAGS = -m32
|
||||
|
||||
# ARCHFLAGS is set into the build environment so that scripts
|
||||
# that utilize this script can execute their own architecture
|
||||
# specific steps.
|
||||
|
||||
ifndef ARCHFLAGS
|
||||
ARCH ?= $(shell uname -i)
|
||||
ifeq ($(ARCH),x86_64)
|
||||
export CFLAGS := $(CFLAGS) -m64
|
||||
export ARCHFLAGS := -m64
|
||||
else
|
||||
export CFLAGS := $(CFLAGS) -m32
|
||||
export ARCHFLAGS := -m32
|
||||
endif
|
||||
else
|
||||
export CFLAGS := $(CFLAGS) $(ARCHFLAGS)
|
||||
export ARCHFLAGS := $(ARCHFLAGS)
|
||||
endif
|
|
@ -45,7 +45,7 @@
|
|||
</option>
|
||||
<option id="gnu.c.compiler.option.misc.other.426315830" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fPIC -m32" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.include.files.1528986146" name="Include files (-include)" superClass="gnu.c.compiler.option.include.files"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.2138840959" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"/>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.2138840959" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.431036435" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.c.linker.so.debug.1356804857" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug">
|
||||
|
|
|
@ -22,6 +22,9 @@ INC=-I../../include \
|
|||
#CFLAGS=-q64 -O3 -qarch=auto -qcpluscmt $(INC) $(DEFS)
|
||||
CFLAGS = $(INC) $(DEFS) -O3 -fPIC
|
||||
-include ../../../../build.native/makefile.arch
|
||||
ifeq ($(ARCHFLAGS),-m64)
|
||||
export CFLAGS := $(CFLAGS) -D__64BIT__
|
||||
endif
|
||||
|
||||
CC=gcc
|
||||
LIB=libgrib2c.a
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include <Python.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "numpy/arrayobject.h"
|
||||
#include "grib2.h"
|
||||
|
@ -45,7 +46,7 @@
|
|||
static PyObject *Grib2FileError;
|
||||
|
||||
int getRecord(FILE * fptr, gribfield ** gfld, int recordNumber,
|
||||
int fieldNumber, int unpack) {
|
||||
g2int fieldNumber, g2int unpack) {
|
||||
|
||||
unsigned char *cgrib;
|
||||
g2int listsec0[3], listsec1[13];
|
||||
|
@ -72,6 +73,10 @@ int getRecord(FILE * fptr, gribfield ** gfld, int recordNumber,
|
|||
|
||||
// Pull out the data
|
||||
cgrib = (unsigned char *) malloc(lgrib);
|
||||
if (cgrib == NULL) {
|
||||
printf("getRecord: failed to malloc cgrib\n");
|
||||
return -1;
|
||||
}
|
||||
ret = fseek(fptr, lskip, SEEK_SET);
|
||||
lengrib = fread(cgrib, sizeof(unsigned char), lgrib, fptr);
|
||||
iseek = lskip + lgrib;
|
||||
|
@ -121,7 +126,7 @@ static PyObject * grib2_getData(PyObject *self, PyObject* args)
|
|||
PyObject * fileInfo;
|
||||
FILE * fptr;
|
||||
int recordNumber;
|
||||
int fieldNumber;
|
||||
g2int fieldNumber;
|
||||
Py_ssize_t sizeSection = 0;
|
||||
int sectionCounter = 0;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Name: awips2-python
|
||||
Summary: AWIPS II Python Distribution
|
||||
Version: 2.7.1
|
||||
Release: 5
|
||||
Release: 6
|
||||
Group: AWIPSII
|
||||
BuildRoot: %{_build_root}
|
||||
BuildArch: %{_build_arch}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue