Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Release Notes for HP-UX 10.30: HP 9000 Computers > Chapter 2 Major Changes for HP-UX 10.30

Command Header File Changes

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

This section contains the changes that were made to the header files in 10.30 for the following reasons:

  • Conformance to standards (POSIX.1C, XPG4.2)

  • Defect repairs

  • Removal of obsolete interfaces

Interface Names

This section describes the various headers that were changed in 10.30.

curses.h

Numerous function prototypes for X/Open curses were modified to match the actual implementation.

disktab.h

The following change was made to match the actual implementation:

OLD: extern struct disktab *getdiskbyname(char *);

NEW: extern struct disktab *getdiskbyname(const char *);

errno.h

Refer to the libc section in Chapter 9 of this document for a description of changes to errno in errno.h.

hpsecurity.h

The following change was made:

OLD: typedef unsigned long mask_t;

NEW: typedef uint32_t mask_t;

In order to preserve backward compatibility when using different compilation environments where the size of an int and a long may be different, mask_t was changed to be a typedef of data type that is 32-bit in the different compilation environments.

iconv.h

The following change was made as a defect repair:

OLD: size_t iconv(iconv_t, char **, size_t *, char **, size_t *);

NEW: extern size_t iconv(iconv_t, const char **, size_t *, char **, size_t *);

limits.h

The following change was made because ssize_t was changed to be a typedef of a long in 10.30:

OLD: #define SSIZE_MAX      INT_MAX

NEW: #define SSIZE_MAX LONG_MAX

ndir.h

<ndir.h> has been delivered on HP-UX 9.x and 10.x releases for source compatibility with legacy HP-UX applications. This file will be delivered in /usr/old/usr/include instead of /usr/include on 10.30. It will not be delivered in a future HP-UX release.

The functionality exported by <ndir.h> is superseded by the functionality provided by <dirent.h>. Applications that currently use <ndir.h> should be changed to use <dirent.h>.

prot.h

prot.h was changed to add prototypes for ANSI-C compilations.

shadow.h

The following change was made:

OLD:

struct spwd {
char * sp_namp; /* user's name */
char * sp_pwdp; /* user's password */
long sp_lstchg; /* last date password was changed */
long sp_min; /* minimum # days between password changes */
long sp_max; /* maximum # days between password changes */
long sp_warn; /* # days to warn user to change password */
long sp_inact; /* max number of days between logins before account
rendered unusable */
long sp_expire; /* day when account is unusable */
unsigned long sp_flag; /* not used */
};


NEW:

struct spwd {
char * sp_namp; /* user's name */
char * sp_pwdp; /* user's password */
time_t sp_lstchg; /* last date password was changed */
time_t sp_min; /* minimum # days between password changes */
time_t sp_max; /* maximum # days between password changes */
time_t sp_warn; /* # days to warn user to change password */
time_t sp_inact; /* max number of days between logins before account
rendered unusable */
time_t sp_expire; /* day when account is unusable */
uint32_t sp_flag; /* not used */
};

In order to preserve backward compatibility when using different compilation environments where the size of an int and a long may be different, long structure entries were changed to be 32 bits for the different compilation environments.

stddef.h

The following change was made as a defect repair:

OLD: typedef int ptrdiff_t;

NEW: typedef long ptrdiff_t;

The fundamental type of ptrdiff_t was changed from a signed 32-bit integer type to a signed 32-bit long.

stdio.h

The following new interfaces were added: vsnprintfa and snprintf.

For conformance to Unix95 and beyond, the following function prototype will be available:

     extern int vsnprintf(char *, size_t, const char *, va_list);

Otherwise, this function prototype will be available:

     extern int vsnprintf(char *, size_t, char *, __va_list);

extern int snprintf(char *, size_t, char *,...);

stdlib.h

The following change was made as a defect repair:

OLD: extern char *setstate(char *);

NEW: extern char *setstate(const char *);

strings.h

The following change was made as a defect repair:

OLD: extern void bzero(char *, int);

NEW: extern void bzero(void *, size_t);

syslog.h

The following change was made as a defect repair:

For conformance to Unix95 and beyond, the following function prototype will be available:

       extern void syslog(int, const char *, ...);

Otherwise, this function prototype will be available:

       extern int syslog(int, const char *, ...);

term.h

This interface has been removed as a defect repair; it was never supported:

 extern int vidattr(chtype);

time.h

The following changes were made:

OLD:

typedef unsigned long clock_t;
typedef unsigned int size_t;

NEW:

typedef unsigned int clock_t;
typedef unsigned long size_t;

utmp.h

The following was added as a defect repair:

extern int utmpname(const char *);

Obsoleted Headers

This section describes the header files that are obsoleted in the 10.30 release.

nl_ctype.h

See the section, "Obsolescence and Deprecation of APIs", in this chapter for details.

Some of the changes will impact existing applications, as described in the next section.

Impact

Impact Due to Addition of or Changes in Function Prototypes

Existing applications that are not using a routine correctly (that is, not assigning the return value to the correct data type or passing in arguments of a type other than that expected by the routine) need to be corrected to conform to the new function prototypes. Existing C++ applications that use the old prototype will also be impacted.

Impact Due to Changes in typedefs

Existing C++ applications will need to be recompiled to use the new typedefs if mixing of pre-10.30 with 10.30 objects is needed.

Compatibility

An existing application will need to be recompiled if any of the following is true:

  • It is not using an interface correctly.

  • Its usage of an interface does not conform to the new function prototype.

  • It is using an obsoleted interface.

  • It is a C++ application and typedefs or protoypes of interfaces it is using have changed.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997, Hewlett-Packard Development Company, L.P.