Changeset 2873


Ignore:
Timestamp:
Nov 12, 2006, 7:57:52 AM (18 years ago)
Author:
bird
Message:

made tst-0 a bare program without any system dependencies (except on nt).

Location:
trunk/kLdr/testcase
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/kLdr/testcase/Makefile.kmk

    r2870 r2873  
    112112TEMPLATE_TSTBAREPROG = Bare bone testcase program template
    113113TEMPLATE_TSTBAREPROG_EXTENDS = TSTBARE
    114 ifneq ($(filter win nt win32 win64,$(BUILD_TARGET)),)
     114ifneq ($(filter win win32 win64,$(BUILD_TARGET)),)
    115115TEMPLATE_TSTBAREPROG_LDFLAGS += -Entry:WinMain -FIXED:NO
    116116else
     117TEMPLATE_TSTBAREPROG_LDFLAGS.nt += -FIXED:NO
    117118endif
    118119
     
    151152tst-0-d_SOURCES  = tst-0-d.c tstDllMainStub.c
    152153
    153 tst-0_TEMPLATE   = TSTPROG
    154 tst-0_SOURCES    = tst-0.c
     154tst-0_TEMPLATE   = TSTBAREPROG
     155tst-0_SOURCES    = tst-0.c tstExeMainStub.c
    155156
    156157ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),)
  • TabularUnified trunk/kLdr/testcase/tst-0.c

    r2863 r2873  
    11#include "tst.h"
    2 #include <stdio.h>
    32
    43MY_IMPORT(int) FuncA(void);
     
    87int main()
    98{
    10     unsigned long ul;
    11     printf("graph:\n"
    12            "  tst-0 -> a -> d\n"
    13            "           b -> d\n"
    14            "           c -> d\n");
    15     ul = FuncA() | FuncB() | FuncC();
    16     if (ul == 0x42424242)
    17         printf("tst-0: success, ul=%#lx\n", ul);
    18     else
    19         printf("tst-0: failure, ul=%#lx\n", ul);
    20     return ul == 0x42424242 ? 0 : 1;
     9    unsigned u;
     10    u = FuncA() | FuncB() | FuncC();
     11    return u == 0x42424242 ? 0 : 1;
    2112}
     13
  • TabularUnified trunk/kLdr/testcase/tst.h

    r2870 r2873  
    3333
    3434
    35 #if defined(__OS2__) || defined(__WIN__)
     35#if defined(__OS2__) || defined(__WIN__) || defined(__NT__)
    3636# define MY_EXPORT(type) __declspec(dllexport) type
    3737//# define MY_IMPORT(type) extern __declspec(dllimport) type
Note: See TracChangeset for help on using the changeset viewer.