DragonFly On-Line Manual Pages

Search: Section:  


GETOBJFORMAT(3)       DragonFly Library Functions Manual       GETOBJFORMAT(3)

NAME

getobjformat -- get preferred object file format

LIBRARY

Standard C Library (libc, -lc)

SYNOPSIS

#include <objformat.h> int getobjformat(char *buf, size_t bufsize, int *argcp __unused, char **argv __unused);

DESCRIPTION

The getobjformat() function copies the name of the preferred object file format (``elf'') into a buffer provided by the caller. The function is currently provided only for backward compatibility. buf points to a user-supplied buffer into which the name of the object file format is copied. bufsize gives the size of the buffer in bytes. The string placed in buf is always null-terminated. It is an error if the buffer is too small to hold the null-terminated name. argv and argcp are unused and new applications should set them to NULL.

RETURN VALUES

On success, getobjformat() returns the length of the object file format name, not counting the null terminator. If the supplied buffer is too small to hold the object file format and its null terminator, getobjformat() returns -1. In that case, the contents of the buffer and argument vector supplied by the caller are indeterminate.

SEE ALSO

objformat(1)

HISTORY

The getobjformat() function first appeared in FreeBSD 3.0. DragonFly 3.5 May 23, 2009 DragonFly 3.5

Search: Section: