[comp.os.os2] Microsoft C 6.0

cpa@bnlux0.bnl.gov (Chris Armstrong) (05/03/90)

I've just received my C 6.0 upgrade.... anyone know how to unpack the files
without having to go through the whole installation procedure? Believe
it or not some people (me!) don't like having loads of unwanted files left
on their hard disk.  Getting rid of unwanted files occasionally results in
accidental deletions.... and I'd like to be able to get the new mouse
driver off for when I am booted up under DOS.

I've found my first problem with 6.0 (apart from NULL no longer being NULL,
and zillions of long/short mismatch warnings being produced by char/int
conversions for the first time).  I hvae a program originally designed for
DOS kernel mode which is ful of printf()s, puts()s and putchar()s.  I've
converted this program to the PM and instead of replacing every printf(),
puts() and putchar() I replaced the functions with my own.  This worked
fine under MSC5.1, as long as remembered to undefine putchar(), using the
multithread library. Not so under 6.0.  puts() and printf() get by okay,
but the linker throws up a "putchar() symbol defined more than once" error,
in spite of the fact that I'm using /NOD and /NOE, and refuses to link.
Anyone got any ideas why this should be so?
I've managed to work around it by changing my putchar() to _putchar().  But
this is a real nuisance as the code is designed for use on many different
systems (the program is called Kermit) and it really shouldn't be necessary.

Chris Armstrong.

mmm@gssc.UUCP (Mitchell McLain) (05/08/90)

In article <1838@bnlux0.bnl.gov> cpa@bnlux0.bnl.gov (Chris Armstrong) writes:
)
)I've just received my C 6.0 upgrade.... anyone know how to unpack the files
)without having to go through the whole installation procedure? Believe
)it or not some people (me!) don't like having loads of unwanted files left
)on their hard disk.  Getting rid of unwanted files occasionally results in
)accidental deletions.... and I'd like to be able to get the new mouse
)driver off for when I am booted up under DOS.

Do
	setup /copy

and answer the questions.  It'll look like it's going to install the whole
thing at first but just get beyond that, and it will ask you which file you
want to copy.

[some other stuff deleted the solution to which I don't have a clue]

jack@csccat.UUCP (Jack Hudler) (05/08/90)

In article <1838@bnlux0.bnl.gov> cpa@bnlux0.bnl.gov (Chris Armstrong) writes:
>
>Believe
>it or not some people (me!) don't like having loads of unwanted files left
>on their hard disk.  Getting rid of unwanted files occasionally results in
>accidental deletions.... and I'd like to be able to get the new mouse
>driver off for when I am booted up under DOS.

C'mon, you mean you can't figure out which ones you don't want.

>
>I've found my first problem with 6.0 (apart from NULL no longer being NULL,
>and zillions of long/short mismatch warnings being produced by char/int
>conversions for the first time). 

Last time I looks a char was 1 byte and a short(int in your case) was 
2 bytes. 
If you ever get to the UNIX world you'll find another surprize. int's 
are 4 bytes. Sounds like this is the case for 2.0.

>I hvae a program originally designed for
>DOS kernel mode which is ful of printf()s, puts()s and putchar()s.  I've
>converted this program to the PM and instead of replacing every printf(),
>puts() and putchar() I replaced the functions with my own.

Why don't your write your own portable library instead of trying to 
re-write C's.
-- 
Jack 		Computer Support Corportion		Dallas,Texas 
Hudler		UUCP: {texsun,texbell}!csccat!jack

marr@cup.portal.com (scott andrew marr) (05/08/90)

I am one of those people waiting for OS/2 Ver. 2.0 before I take the
plunge and invest money in a development system.  The other day I
received an update offer from Microsoft for C Ver. 6.0 at a resonable
price.  My question is, when OS/2 Ver. 2.0 finally is released will I
have to purchase another Microsoft C upgrade?  (It seems to me that I 
would so that the compiler would default to 32 bits for addresses and data) 
The current C upgrade offer is good until August so I'm taking a wait and 
see attitude until then.  Any insight or information would be appreciated.

==============================================================================
                              |     marr@cup.portal.com
	Scott Marr            |            or
                              |     marr@decster1.msd.lmsc.lockheed.com
==============================================================================

ddl@husc6.harvard.edu (Dan Lanciani) (05/09/90)

In article <3697@csccat.UUCP>, jack@csccat.UUCP (Jack Hudler) writes:
| In article <1838@bnlux0.bnl.gov> cpa@bnlux0.bnl.gov (Chris Armstrong) writes:
| >
| >Believe
| >it or not some people (me!) don't like having loads of unwanted files left
| >on their hard disk.  Getting rid of unwanted files occasionally results in
| >accidental deletions.... and I'd like to be able to get the new mouse
| >driver off for when I am booted up under DOS.
| 
| C'mon, you mean you can't figure out which ones you don't want.

	When I installed 5.1, one of the ones *I* didn't want was "rm."
Trouble was, before the install procedure I used to have an "rm" that
I did want...

| >I've found my first problem with 6.0 (apart from NULL no longer being NULL,
| >and zillions of long/short mismatch warnings being produced by char/int
| >conversions for the first time). 
| 
| Last time I looks a char was 1 byte and a short(int in your case) was 
| 2 bytes. 
| If you ever get to the UNIX world you'll find another surprize. int's 
| are 4 bytes. Sounds like this is the case for 2.0.

	Gee, my pdp-11s have 16-bit ints and they claim to be running
unix.  I guess they must be lying.

				Dan Lanciani
				ddl@harvard.*

sather@blake.acs.washington.edu (Jim Sather) (05/09/90)

In article <2857@husc6.harvard.edu> ddl@husc6.harvard.edu (Dan Lanciani) writes:
| In article <3697@csccat.UUCP>, jack@csccat.UUCP (Jack Hudler) writes:
| | In article <1838@bnlux0.bnl.gov> cpa@bnlux0.bnl.gov (Chris Armstrong) writes:
| | >

[Stuff on accidently overwriting your own files deleted]

| 
| | >I've found my first problem with 6.0 (apart from NULL no longer being NULL,

Well, let me Quote a little from ANSI C X3J11 Section 4.1.5 "... The macros are
NULL, which expands to an implementation defined null pointer constant..."
                                                 ^^^^^^^^^^^^^^^^^^^^^
What does this mean?  It means null isn't defined as

#define NULL    0        or
#define NULL    0L       but rather something like
#define NULL    ((void*)0)

| | >and zillions of long/short mismatch warnings being produced by char/int
| | >conversions for the first time). 
| | 
| | Last time I looks a char was 1 byte and a short(int in your case) was 
| | 2 bytes. 

This is exactly it, you basically have one of two choices to eliminate the
error messages.

1.(easiest) Reduce the warning level to level 2 or level 1
2.(hardest) Apply the necessary cast to the assignment

	int i;
	char c;

	i=65;
	c = (char)i;


Jim Sather
sather@blake.acs.washington.edu