now ncx.m4 is the same as PnetCDF's except PNETCDF is not defined

This commit is contained in:
Wei-keng Liao 2016-10-09 21:58:43 -05:00
parent 0eff6cb128
commit f336af5474

View File

@ -1,44 +1,13 @@
dnl dnl Process this m4 file to produce 'C' language file.
dnl sjl: this version of ncx.m4 has SX-specific optimisations as per
dnl Harveys mods to earlier versions. However, I have removed
dnl support for FLOAT2 and attempted to tidy up the mods to
dnl reduce the complexity a bit
dnl
dnl This is m4 source.
dnl Process using m4 to produce 'C' language file.
dnl dnl
dnl If you see this line, you can ignore the next one. dnl If you see this line, you can ignore the next one.
/* Do not edit this file. It is produced from the corresponding .m4 source */ /* Do not edit this file. It is produced from the corresponding .m4 source */
dnl dnl
/* /*
* Copyright 1996, University Corporation for Atmospheric Research * Copyright (C) 2014, Northwestern University and Argonne National Laboratory
* See netcdf/COPYRIGHT file for copying and redistribution conditions. * See COPYRIGHT notice in top-level directory.
*
* This file contains some routines derived from code
* which is copyrighted by Sun Microsystems, Inc.
* The "#ifdef vax" versions of
* ncx_put_float_float()
* ncx_get_float_float()
* ncx_put_double_double()
* ncx_get_double_double()
* ncx_putn_float_float()
* ncx_getn_float_float()
* ncx_putn_double_double()
* ncx_getn_double_double()
* are derived from xdr_float() and xdr_double() routines
* in the freely available, copyrighted Sun RPCSRC 3.9
* distribution, xdr_float.c.
* Our "value added" is that these are always memory to memory,
* they handle IEEE subnormals properly, and their "n" versions
* operate speedily on arrays.
*/ */
/* $Id: ncx.m4 2795 2014-10-27 23:12:51Z wkliao $ */ /* $Id: ncx.m4 2528 2016-10-10 00:10:17Z wkliao $ */
/*
* An external data representation interface.
*/
#pragma GCC diagnostic ignored "-Wdeprecated"
dnl dnl
dnl The following m4 macro is to differentiate PnetCDF and netCDF in terms of dnl The following m4 macro is to differentiate PnetCDF and netCDF in terms of
@ -52,13 +21,23 @@ dnl
dnl the rest of this file is shared with PnetCDF's ncx.m4 dnl the rest of this file is shared with PnetCDF's ncx.m4
dnl dnl
ifdef(`PNETCDF',`
`#'if HAVE_CONFIG_H
`#'include <ncconfig.h>
`#'endif')
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include "ncx.h"
ifdef(`PNETCDF', `#include "macro.h"') ifdef(`PNETCDF',`
`#'include "ncx.h"
`#'include "macro.h"',`
`#'pragma GCC diagnostic ignored "-Wdeprecated"
`#'include "ncx.h"
`#'include "nc3dispatch.h"')
define(`IntType', `ifdef(`PNETCDF', `MPI_Offset', `size_t')')dnl define(`IntType', `ifdef(`PNETCDF', `MPI_Offset', `size_t')')dnl
define(`APIPrefix', `ifdef(`PNETCDF', `ncmpi', `nc')')dnl define(`APIPrefix', `ifdef(`PNETCDF', `ncmpi', `nc')')dnl
define(`NC_TYPE', `ifdef(`PNETCDF', `ifelse( define(`NC_TYPE', `ifdef(`PNETCDF', `ifelse(
@ -78,9 +57,9 @@ define(`NC_TYPE', `ifdef(`PNETCDF', `ifelse(
`$1')')')dnl `$1')')')dnl
ifdef(`PNETCDF', , ` ifdef(`PNETCDF', , `
#define DEBUG_RETURN_ERROR(err) return err; `#'define DEBUG_RETURN_ERROR(err) return err;
#define DEBUG_ASSIGN_ERROR(status, err) status = err; `#'define DEBUG_ASSIGN_ERROR(status, err) status = err;
#define DEBUG_TRACE_ERROR')dnl `#'define DEBUG_TRACE_ERROR')
#ifdef HAVE_INTTYPES_H #ifdef HAVE_INTTYPES_H
#include <inttypes.h> /* uint16_t, uint32_t, uint64_t */ #include <inttypes.h> /* uint16_t, uint32_t, uint64_t */