---
name: "globus_common"
section: "3"
platform: "linux"
package: "libglobus-common-doc"
version: "18.14-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_common"
---

# globus\_common(3)

Globus Common API - Common Data Structures and Functions.

## NAME

globus\_common - Globus Common API

 \- Common Data Structures and Functions.

## SYNOPSIS

### Modules

**Globus Callback**\
 Globus Callback Function Interface.  **Globus Error API**\
 Globus Error API.  **FIFO Queue**\
 FIFO Queue Implementation.  **Handle Table for Reference Counting Data**\
 Handle Table for Reference Counting Data.  **Hash Table**\
 Hash Table.  **Linked List**\
 Linked List.  **Memory Pool**\
 Memory Pool.  **Module Activation Management**\
 Module Activation Management.  **Priority Queue**\
 Priority Queue.  **Threading**\
 Portable Thread Abstraction.  **Thread Pooling**\
 Thread Pooling.  **URL String Parser**\
 URL String Parser.  **Globus UUID Generator**\
 UUID Generator.

### Macros

\#define **GLOBUS\_COMMON\_MODULE**   (&globus\_i\_common\_module)\
 Globus Common Module Descriptor.  #define **GLOBUS\_TILDE\_EXPAND**\
 Expand ~.  #define **GLOBUS\_TILDE\_USER\_EXPAND**\
 Expand ~user.  #define **GLOBUS\_TRUE**   1\
 True value for globus\_bool\_t.  #define **GLOBUS\_FALSE**   0\
 False value for globus\_bool\_t.  #define **GLOBUS\_SUCCESS**   0\
 Generic success result

Most Globus API functions return this value to indicate success, or some error constant or globus\_result\_t to indicate an error. " #define **GLOBUS\_FAILURE**   -1\
 Generic failure result

Some Globus API functions without good error handling return this value to indicate some undetermined error occurred. "

### Typedefs

typedef size\_t **globus\_size\_t**\
 Standard size of memory object

The globus\_size\_t is the size of a memory object. It is identical to size\_t in all cases and doesn't need to be used ever. " typedef socklen\_t **globus\_socklen\_t**\
 Size of a socket length parameter.  typedef unsigned char **globus\_byte\_t**\
 Unsigned byte datatype

This is used for byte-addressable arrays of arbitrary data which is not subject to sign extension. " typedef int **globus\_bool\_t**\
 Boolean type.  typedef uint32\_t **globus\_result\_t**\

### Functions

**globus\_result\_t** **globus\_eval\_path** (const char \*pathstring, char \*\*bufp)\
 int **globus\_tilde\_expand** (unsigned long options, **globus\_bool\_t** url\_form, char \*inpath, char \*\*outpath)\
 Expand ~ and/or ~user in path strings.

## Detailed Description

Common Data Structures and Functions.

## Container Data Types

- •

  **Linked List**

- •

  **FIFO Queue**

- •

  **Handle Table for Reference Counting Data**

- •

  **Hash Table**

- •

  **Priority Queue**

## Common Runtime Components

- •

  **Threading**

- •

  **Globus Callback**

- •

  **Memory Pool**

- •

  **Module Activation Management**

## Error Handling

- •

  **Globus Error API**

## Miscellaneous Utilities

- •

  **Globus UUID Generator**

- •

  **URL String Parser**

## Typedef Documentation

### typedef int globus\_bool\_t

Boolean type. Set values to either the constant GLOBUS\_TRUE and GLOBUS\_FALSE

### typedef uint32\_t globus\_result\_t

Weak pointer to a Globus Error object, or the special value GLOBUS\_SUCCESS

### typedef socklen\_t globus\_socklen\_t

Size of a socket length parameter. The globus\_socklen\_t type is part of the POSIX socket interface and is also available in winsock2.h. In older UNIX implementations, this was variously a size\_t or an int.

## Function Documentation

### globus\_result\_t globus\_eval\_path (const char \* pathstring, char \*\* bufp)

**Parameters**

*pathstring* A string containing any number of variable path references using the syntax ${PATH-NAME} Supported path elements are

- •

  prefix

- •

  exec\_prefix

- •

  sbindir

- •

  bindir

- •

  libdir

- •

  libexecdir

- •

  includedir

- •

  datarootdir

- •

  datadir

- •

  mandir

- •

  sysconfdir

- •

  sharedstatedir

- •

  localstatedir

- •

  perlmoduledir These strings are based on the parameters passed to this package configure script, but modified so that if GLOBUS\_LOCATION is set in the environment, it is used instead of the configured path.

*bufp* Pointer to be set to a newly allocated string that has recursively resolved all substitution paths.

### int globus\_tilde\_expand (unsigned long options, globus\_bool\_t url\_form, char \* inpath, char \*\* outpath)

Expand ~ and/or ~user in path strings. Expand the leading ~ (or ~user) characters from inpath to the home directory path of the current user (or user specified in ~user); the result is stored in a newly allocated buffer \*outpath (which will need to be freed by a call to globus\_free.) The string following the ~/or ~user/ is copied verbatim to the output string.

**Parameters**

*options* The expansion is conditioned by the options as defined in **globus\_tilde\_expand.h**:

- •

  GLOBUS\_TILDE\_EXPAND: expand ~

- •

  GLOBUS\_TILDE\_USER\_EXPAND: expand ~user Otherwise, the corresponding form is not expanded (just copied int the output path)

*url\_form* True if the inpath follows an URL format (/~) Used when expanding an url (for : \<scheme\>://host\[:port\]\[/path\] were /path can be of the form /~\[user\]\[/...\]. Otherwise, the form ~\[user\]\[/...\] is expected. \
 *inpath* Input string to expand. \
 *outpath* Output string; Need to be freed when not used anymore.

## Author

Generated automatically by Doxygen for globus\_common from the source code.
