Changeset 2442


Ignore:
Timestamp:
2001-05-17T16:38:16+12:00 (23 years ago)
Author:
jrm21
Message:

portability changes, use getopt from unistd.h (all POSIX systems)

Location:
trunk/gsdl/src/mgpp
Files:
3 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/lib/Makefile.in

    r2372 r2442  
    4747localedir = $(datadir)/locale
    4848 
    49 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
    50 CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
     49COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
     50CPPCOMPILE = $(CPP) -c $(DEFS) $(INCLUDES) $(CPPFLAGS)
    5151 
    5252.SUFFIXES:
     
    8080HEADERS = \
    8181    bitio_m_random.h   local_strings.h    lovinstem.h \
    82     bitio_m_stdio.h    getopt.h           memlib.h           netorder.h \
     82    bitio_m_stdio.h    memlib.h           netorder.h \
    8383    bitio_gen.h        mgheap.h           messages.h \
    8484    bitio_m.h          huffman.h  \
     
    9494    huffman.cpp       messages.cpp \
    9595    bitio_gen.cpp     perf_hash.cpp \
    96     getopt.cpp         \
    97     getopt1.cpp       local_strings.cpp lovinstem.cpp \
     96    local_strings.cpp lovinstem.cpp \
    9897    bitio_m_mem.cpp   bitio_m_stdio.cpp bitio_m_mems.cpp \
    99     alloca.c                     xmalloc.c         strstr.cpp \
    100     gmalloc.c         ftruncate.cpp     strcasecmp.cpp    random.cpp \
     98    alloca.c          xmalloc.c         strstr.cpp \
     99    ftruncate.cpp     strcasecmp.cpp    random.cpp \
    101100    simplefrenchstem.cpp                unitool.cpp       bitio_m_random.cpp \
    102101    bitio_m_abstract.cpp
     
    106105    huffman$o         messages$o \
    107106    bitio_gen$o       perf_hash$o \
    108     getopt$o           \
    109107     local_strings$o   lovinstem$o \
    110108    bitio_m_mem$o     bitio_m_stdio$o   bitio_m_mems$o \
     
    112110     random$o          simplefrenchstem$o \
    113111    unitool$o
    114 #   memlib$o  removed - assume we use std system malloc, free, etc.
    115 # only need getopt1$o if we don't have <unistd.h>
    116 # probably don't need gmalloc either (see top-level configure - for HP-UX)
    117112
    118113DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
     
    124119    $(AR) cru libmg.a $(OBJECTS)
    125120    $(RANLIB) libmg.a
    126 
    127 $(OBJECTS): ../../../config.h
    128121
    129122install:
  • trunk/gsdl/src/mgpp/lib/local_strings.h

    r855 r2442  
    4747      suff  = **base;
    4848      *base = *base + 1;
    49       bcopy((char *) *base, (char *) (data + copy + 1), suff);
     49      memcpy( (data + copy + 1), *base, suff);
    5050      *data = copy + suff;
    5151      *base += suff;
  • trunk/gsdl/src/mgpp/lib/sysfuncs.h

    r1294 r2442  
    300300/* Until getoptold function is declared in getopt.h, we need this here for
    301301   struct option.  */
    302 #include <getopt.h>
     302/*#include <getopt.h>*/
    303303
    304304#ifdef WITH_DMALLOC
  • trunk/gsdl/src/mgpp/text/Makefile.in

    r1597 r2442  
    3737CC = @CC@
    3838CPP = @CXX@
    39 CFLAGS = @CFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g  -DSILENT -DSHORT_SUFFIX
    40 CPPFLAGS = @CPPFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g -DSILENT -DSHORT_SUFFIX
     39CFLAGS = @CFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX
     40CPPFLAGS = @CPPFLAGS@ -ansi -DSILENT -DSHORT_SUFFIX
    4141DEFS = @DEFS@
    4242RANLIB = @RANLIB@
  • trunk/gsdl/src/mgpp/text/Queryer.cpp

    r1850 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "MGQuery.h"
  • trunk/gsdl/src/mgpp/text/mg_compression_dict.cpp

    r860 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "sysfuncs.h"
     
    4447/*
    4548   $Log$
     49   Revision 1.3  2001/05/17 04:38:15  jrm21
     50   portability changes, use getopt from unistd.h (all POSIX systems)
     51
    4652   Revision 1.2  2000/01/18 03:53:22  rjmcnab
    4753   Fixed a couple of bugs and made building silent if needed.
  • trunk/gsdl/src/mgpp/text/mg_decompress_text.cpp

    r1123 r2442  
    2121 *
    2222 **************************************************************************/
     23
     24#define _XOPEN_SOURCE 1
     25#define _XOPEN_SOURCE_EXTENDED 1
     26#include <unistd.h>
    2327
    2428#include "sysfuncs.h"
  • trunk/gsdl/src/mgpp/text/mg_fast_comp_dict.cpp

    r860 r2442  
    2525/*
    2626   $Log$
     27   Revision 1.3  2001/05/17 04:38:15  jrm21
     28   portability changes, use getopt from unistd.h (all POSIX systems)
     29
    2730   Revision 1.2  2000/01/18 03:53:23  rjmcnab
    2831   Fixed a couple of bugs and made building silent if needed.
     
    6164   *
    6265 */
     66
     67#define _XOPEN_SOURCE 1
     68#define _XOPEN_SOURCE_EXTENDED 1
     69#include <unistd.h>
    6370
    6471#include "sysfuncs.h"
     
    132139
    133140  cur = buffer = Xmalloc (mem);
    134   bzero (buffer, mem);
     141  memset (buffer, 0, mem);
    135142  fixup = (u_char *) Xmalloc (fixup_mem);
    136   bzero (fixup, fixup_mem);
     143  memset (fixup, 0, fixup_mem);
    137144
    138145#ifndef SILENT
  • trunk/gsdl/src/mgpp/text/mg_invf_dict.cpp

    r860 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "sysfuncs.h"
     
    3033/*
    3134   $Log$
     35   Revision 1.3  2001/05/17 04:38:15  jrm21
     36   portability changes, use getopt from unistd.h (all POSIX systems)
     37
    3238   Revision 1.2  2000/01/18 03:53:24  rjmcnab
    3339   Fixed a couple of bugs and made building silent if needed.
  • trunk/gsdl/src/mgpp/text/mg_invf_dict_dump.cpp

    r1899 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "sysfuncs.h"
     
    3033/*
    3134   $Log$
     35   Revision 1.3  2001/05/17 04:38:15  jrm21
     36   portability changes, use getopt from unistd.h (all POSIX systems)
     37
    3238   Revision 1.2  2001/02/02 01:13:05  kjm18
    3339   changed the help message
  • trunk/gsdl/src/mgpp/text/mg_invf_dump.cpp

    r1898 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "sysfuncs.h"
     
    3740/*
    3841   $Log$
     42   Revision 1.3  2001/05/17 04:38:16  jrm21
     43   portability changes, use getopt from unistd.h (all POSIX systems)
     44
    3945   Revision 1.2  2001/02/02 01:12:29  kjm18
    4046   added more command line options, and better help message
  • trunk/gsdl/src/mgpp/text/mg_passes.cpp

    r856 r2442  
    2323 **************************************************************************/
    2424
     25#define _XOPEN_SOURCE 1
     26#define _XOPEN_SOURCE_EXTENDED 1
     27
    2528#include "sysfuncs.h"
    2629
     
    2831# include <malloc.h>
    2932#endif
     33
     34#include <unistd.h>
    3035
    3136#include "memlib.h"
     
    4752/*
    4853   $Log$
     54   Revision 1.2  2001/05/17 04:38:16  jrm21
     55   portability changes, use getopt from unistd.h (all POSIX systems)
     56
    4957   Revision 1.1  2000/01/14 02:26:18  sjboddie
    5058   Rodgers new C++ mg
  • trunk/gsdl/src/mgpp/text/mg_perf_hash_build.cpp

    r2377 r2442  
    2222 **************************************************************************/
    2323
     24#define _XOPEN_SOURCE 1
     25#define _XOPEN_SOURCE_EXTENDED 1
     26#include <unistd.h>
     27
    2428#include "sysfuncs.h"
    2529#include "memlib.h"
     
    3741/*
    3842   $Log$
     43   Revision 1.4  2001/05/17 04:38:16  jrm21
     44   portability changes, use getopt from unistd.h (all POSIX systems)
     45
    3946   Revision 1.3  2001/05/07 05:01:47  jrm21
    4047   replaced bcopy with memcpy
  • trunk/gsdl/src/mgpp/text/mg_stem_idx.cpp

    r2377 r2442  
    2020 **************************************************************************/
    2121
     22#define _XOPEN_SOURCE 1
     23#define _XOPEN_SOURCE_EXTENDED 1
     24#include <unistd.h>
    2225
    2326#include "sysfuncs.h"
     
    4649/*
    4750   $Log$
     51   Revision 1.5  2001/05/17 04:38:16  jrm21
     52   portability changes, use getopt from unistd.h (all POSIX systems)
     53
    4854   Revision 1.4  2001/05/07 05:01:47  jrm21
    4955   replaced bcopy with memcpy
  • trunk/gsdl/src/mgpp/text/mg_weights_build.cpp

    r861 r2442  
    2121 *
    2222 **************************************************************************/
     23#define _XOPEN_SOURCE 1
     24#define _XOPEN_SOURCE_EXTENDED 1
     25#include <unistd.h>
    2326
    2427#include "sysfuncs.h"
     
    4851/*
    4952   $Log$
     53   Revision 1.4  2001/05/17 04:38:16  jrm21
     54   portability changes, use getopt from unistd.h (all POSIX systems)
     55
    5056   Revision 1.3  2000/01/18 23:24:19  rjmcnab
    5157   fixed a few more bugs
Note: See TracChangeset for help on using the changeset viewer.