#!/bin/bash
# gdbm.h gives the following warning:
# warning: ‘gdbm_pool’ has a field ‘gdbm_pool::dbf’ whose type 
# uses the anonymous namespace [enabled by default]
# this is because the typedef of GDBM_FILE contains a nameless
# struct.
# this script adds a name to this struct
sed '/typedef struct.*GDBM_FILE/s/struct/struct gdbmfilestruct/' /usr/include/gdbm.h |
  sed 's/char \*dptr/void *dptr/' > gdbm.h
  exit
  | sed 's/P((char/P((void/' > gdbm.h
