Changeset 1157


Ignore:
Timestamp:
Feb 4, 2004, 9:55:41 PM (22 years ago)
Author:
bird
Message:

Added logging facilities.

Location:
trunk/src/emx
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.42 to 1.43
    r1156 r1157  
    105105CFLAGS.omf  = -Zomf
    106106CFLAGS.prof = -pg
     107CFLAGS.log  = -DDEBUG_LOGGING
    107108# The object files are put in subdirectory objectformat-targetkind,
    108109# we decompose object file name back and pick appropiate $CFLAGS
    109110CFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(CFLAGS.$x))
    110111# How to compile a .c file
    111 DO.COMPILE.c = $(CC) $(strip $(CFLAGS) $1) -o $@ $(srcdir)/$< -I$(dir $<)
    112 DO.COMPILE.s = $(call DO.COMPILE.c,-x assembler-with-cpp $1)
     112DO.COMPILE.c = $(CC) -std=gnu99 $(strip $(CFLAGS) $1) -o $@ $(srcdir)/$< -I$(dir $<)
     113# '-std=gnu99' doesn't work with '-x assembler-with-cpp', therefor no $(call DO.COMPILE.c).
     114DO.COMPILE.s = $(CC) -x assembler-with-cpp $(strip $(CFLAGS) $1) -o $@ $(srcdir)/$< -I$(dir $<)
    113115
    114116# The linker
  • trunk/src/emx/common.smak

    • Property cvs2svn:cvs-rev changed from 1.9 to 1.10
    r1156 r1157  
    2626.tmp += prof
    2727endif # neq ($(findstring prof,$(.TKIND)),)
     28ifneq ($(findstring log,$(.TKIND)),)
     29.tmp += log
     30endif # neq ($(findstring log,$(.TKIND)),)
    2831.TKIND := $(.tmp)
    2932ifdef .TKVAR
  • trunk/src/emx/src/lib/app/app.smak

    • Property cvs2svn:cvs-rev changed from 1.6 to 1.7
    r1156 r1157  
    1919LIBC.DLL.OBJS += $(.OBJS)
    2020
     21.TKIND  := aout log
     22.TARGET := libc_app_l.a
     23include mklib.smak
     24                               
    2125.TKIND  := aout prof
    2226.TARGET := libc_app_p.a
  • trunk/src/emx/src/lib/startup/exit.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r1156 r1157  
    44#include <stdlib.h>
    55#include <emx/startup.h>
     6#include <emx/libclog.h>
    67
    78void (*_atexit_v[64])(void);
     
    1011void _STD(exit) (int ret)
    1112{
     13  LIBCLOG_ENTER("ret=%d\n", ret);
    1214  int i;
    1315
    1416  for (i = _atexit_n-1; i >= 0; --i)
    15     _atexit_v[i]();
     17    {
     18      LIBCLOG_MSG("calling _atexit[%d] %p\n", i, _atexit_v[i]);
     19      _atexit_v[i]();
     20    }
    1621  _CRT_term ();
     22  LIBCLOG_MSG("calling _exit\n");
    1723  _exit (ret);
    1824}
  • trunk/src/emx/src/lib/startup/startup.c

    • Property cvs2svn:cvs-rev changed from 1.8 to 1.9
    r1156 r1157  
    99#include <emx/syscalls.h>
    1010#include <emx/startup.h>
     11#include <emx/libclog.h>
    1112
    1213extern int __crtinit1__;
     
    1819int _CRT_init (void)
    1920{
     21  LIBCLOG_ENTER("\n");
    2022  static int startup_flag;
    2123
     
    2325     _DLL_InitTerm() and by the application program's startup code). */
    2426  if (startup_flag)
    25     return 0;
     27    LIBCLOG_RETURN_INT(0);
    2628  startup_flag = 1;
    2729
     
    3638  errno = 0;
    3739
    38   return 0;
     40  LIBCLOG_RETURN_INT(0);
    3941}
    4042
Note: See TracChangeset for help on using the changeset viewer.