# empecc

    EMPECC(1)                                                            EMPECC(1)

    NAME
           empecc - compiles C programs invoking the EMPRESS Precompiler libraries

    SYNOPSIS
           empecc [empecc_options] [cc_options] file ...

    DESCRIPTION
           Empecc invokes C Compiler with the EMPRESS Precompiler libraries.   The
           file  list  should  include  the  OUTFILE  and SUPPORTFILE generated by
           empesql.  These have the default names of mpout.c and  mpsup.c  respec-
           tively. Empecc_options are:

           -ansi_c                       Use Strict Ansi C compiler (the Version 8
                                         default will use Ansi C but not necessary
                                         Strict Ansi C)

           -c_compiler  compiler_name     Invokes  a C compiler different than the
                                         default one specified in  MSSYS_CCOMPILER
                                         of $EMPRESSPATH/config/options file.

           -echoline                     Print  out the contents of the executable
                                         without generating an output file.

           -listlines                    Print out the contents of the  executable
                                         in  multiple  lines without generating an
                                         output file.

           -linker filename              Use the given filename to do linking  and
                                         do not compile.

           -noglobmain                   Use  this  option  if msmain is not used.
                                         Some compiler complains if this option is
                                         not used.

           -noshlib  [-loadpsmapi]        Do  not  use  Empress shared library. If
                                         additional  option  loadpsmapi  is  used,
                                         load those extra Empress static libraries
                                         needed  for  Persistant  Stored   Modules
                                         (PSM).

           -sptrash                      Trash the memory space when the memory is
                                         free. This option can be used as  a  tool
                                         to  debug  memory problem. Empress shared
                                         libraries will not be used if this option
                                         is specified.

           -pthread                      Generates  thread-safe  code  for program
                                         that is written  for  the  multi-threaded
                                         application. This means that Empress rou-
                                         tines can be invoked in a  multi-threaded
                                         application.  This  is  done  by multiple
                                         threads in parallel; however their execu-
                                         tion is serialized. The net effect is the
                                         same as  running  in  a  single  threaded
                                         environment.

                                         The effect of an ESQL statement is global
                                         to all threads.  For example, the opening
                                         or  closing of a table from one thread is
                                         visible to all the threads within a  pro-
                                         cess.  The multi-threaded application has
                                         the responsibility for using  these  ESQL
                                         statements in a thread-safe manner, which
                                         is different from whether  or  not  these
                                         ESQL  statements  are  thread-safe.   For
                                         example,  a  multi-threaded   application
                                         that  closes a table that is still in use
                                         by other threads within  the  application
                                         is  not using the close statement thread-
                                         safely.

                                         In particular, various EXEC SQL sequences
                                         should  be  protected  by  user-specified
                                         explicit  synchronization  constructs  if
                                         they  are used in multiple threads. These
                                         include transactions: START  TRANSACTION,
                                         ..., COMMIT/ROLLBACK TRANSACTION and cur-
                                         sor usages:  OPEN  CURSOR,  FETCH,  CLOSE
                                         CURSOR.

                                         Various  global  constructs are specified
                                         in ANSI SQL  for  returning  status/error
                                         information.   The global constructs that
                                         are  thread-safe  are:  SQLCODE,  SQLCNT,
                                         SQLWARN0. Other global constructs such as
                                         SQLCMD, SQLWARN1,  SQLERRMC  and  mroperr
                                         are not thread-safe.

           -spmalloc                     Use  malloc  to allocate space instead of
                                         Empress' memory  manager.  It  is  useful
                                         when  a  third-party  memory  debugger is
                                         used.   Usually,  it   is   slower   than
                                         Empress' memory manager.

    FILES
           EMPRESS libraries

    SEE ALSO
           empesql(1), empcc(1), empef77(1)

           Empress Host Language: The SQL Precompiler

    DIAGNOSTICS
           See cc(1).

    HISTORY
           Written  by  Empress  Software  Inc..   All material is copyrighted and
           licensed.  Use on non-licensed CPUs is prohibited.

    Empress 8.62                 Empress Software Inc.                   EMPECC(1)